Hmmm... Dont suppose that there is a list of these properties which could be used anywhere? I cant find anything in the
'BBB GUI Constants.dba', which I imagine is the most likely place.
Also if there was a detailed description of what this command actually does so it would be possible to fully utilise it in my program as I rarely use it.
EDIT
I noticed that there was a font requester dialogue not yet started and I made one quickly for everyone's pleasure. Its very simple and Im sure the algorithms could be improved on but currently I believe it is bug free. The variables which must be externally linked to the function are;
dbpro_w AS INTEGER - links to the parent window of the font dialogue
e1, e2 : AS INTEGER - the ID of two edit boxes which will automatically be changed to this font on save or restore (e1 was my main edit box and e3 was my line numbers box)
textsize AS INTEGER - parameter 2 of window set font
textstyle$ AS INTEGER - parameter 3 of window set font
textitalic AS INTEGER - parameter 4 of window set font
textunderline AS INTEGER - parameter 5 of window set font
textstrikeout AS INTEGER - parameter 6 of window set font
textbold AS INTEGER - parameter 7 of window set font
Other than that you simply call the below function and the dialogue box will pop up and work as it should.
function font()
GLOBAL cb1
GLOBAL cb2
GLOBAL cb3
if fontwindow = 0
fontwindow = 1
fw = make window((desktop width() - 400)/2,(desktop height() - 400)/2,500,400,"Font Dialogue",dbpro_w,WS_EX_STATICEDGE||WS_OVERLAPPED)
windows set font 7,"Arial",0,0,0,0
l = make label(10,90,200,20,"Font:",fw)
l = make label(210,90,180,20,"Font Style:",fw)
l = make label(390,90,95,20,"Size:",fw)
fw_fb = make editbox(50,20,400,50,ES_CENTER||ES_READONLY,fw)
cb1 = make combobox(15,110,190,200,CBS_SIMPLE||WS_VSCROLL,fw)
cb2 = make combobox(215,110,170,200,CBS_SIMPLE||WS_VSCROLL,fw)
cb3 = make combobox(395,110,90,200,CBS_SIMPLE||WS_VSCROLL,fw)
perform checklist for fonts
fonttotal = checklist quantity()
for i = 1 to fonttotal
font$(i) = checklist string$(i)
next i
for t = 1 to fonttotal
combobox add string cb1, checklist string$(t)
if font$(t) = textstyle$ then combobox set selected item cb1, t-1
next t
combobox add string cb2, "Normal"
if text_return(0,0,0,0) then combobox set selected item cb2, 0
combobox add string cb2, "Bold"
if text_return(0,0,0,1) then combobox set selected item cb2, 1
combobox add string cb2, "Strike Out"
if text_return(0,0,1,0) then combobox set selected item cb2, 2
combobox add string cb2, "Italic"
if text_return(1,0,0,0) then combobox set selected item cb2, 3
combobox add string cb2, "Underlined"
if text_return(0,1,0,0) then combobox set selected item cb2, 4
combobox add string cb2, "Bold And Italic"
if text_return(1,0,0,1) then combobox set selected item cb2, 5
combobox add string cb2, "Bold And Underlined"
if text_return(0,1,0,1) then combobox set selected item cb2, 6
combobox add string cb2, "Italic And Underlined"
if text_return(1,1,0,0) then combobox set selected item cb2, 7
combobox add string cb2, "Bold, Italic And Underlined"
if text_return(1,1,0,1) then combobox set selected item cb2, 8
for a = 1 to 12
combobox add string cb3, str$(a+6)
if a+6 = textsize then combobox set selected item cb3, a-1
next a
fw_bt1 = make button(390, 350, 100, 22, "Close", fw)
fw_bt2 = make button(265, 350, 120, 22, "Save Changes", fw)
fw_bt3 = make button(160, 350, 100, 22, "Restore", fw)
window set font fw_fb, textsize, textstyle$, textitalic, textunderline, textstrikeout, textbold
window set text fw_fb, "Aa Bb Cc Dd Ee Ff Gg"
originalindex = combobox get selected item(cb1)
endif
a = 8
disable window dbpro_w
while fontwindow = 1
a = val(combobox get selected item text(cb3))
if combobox get selected item(cb2) = 0
b = 0
c = 0
d = 0
e = 0
endif
if combobox get selected item(cb2) = 1
b = 0
c = 0
d = 0
e = 1
endif
if combobox get selected item(cb2) = 2
b = 0
c = 0
d = 1
e = 0
endif
if combobox get selected item(cb2) = 3
b = 1
c = 0
d = 0
e = 0
endif
if combobox get selected item(cb2) = 4
b = 0
c = 1
d = 0
e = 0
endif
if combobox get selected item(cb2) = 5
b = 1
c = 0
d = 0
e = 1
endif
if combobox get selected item(cb2) = 6
b = 0
c = 1
d = 0
e = 1
endif
if combobox get selected item(cb2) = 7
b = 1
c = 1
d = 0
e = 0
endif
if combobox get selected item(cb2) = 8
b = 1
c = 1
d = 0
e = 1
endif
if a1 <> a or b1 <> b or c1 <> c or d1 <> d or e2 <> e or f1$ <> f$
`window set font fw_fb, textsize, textstyle$, textitalic, textunderline, textstrikeout, textbold
window set font fw_fb, a, f$, b, c, d, e
a1 = a
b1 = b
c1 = c
d1 = d
e2 = e
f1$ = f$
endif
f$ = combobox get selected item text(cb1)
if button clicked(fw_bt3)
textsize = 8
textstyle$ = "Consolas"
textitalic = 0
textunderline = 0
textstrikeout = 0
textbold = 0
window set font e1, textsize, textstyle$, textitalic, textunderline, textstrikeout, textbold
window set font e3, textsize, textstyle$, textitalic, textunderline, textstrikeout, textbold
delete window fw
fontwindow = 0
endif
if button clicked(fw_bt2)
if combobox get selected item(cb2) = 0
textitalic = 0
textunderline = 0
textstrikeout = 0
textbold = 0
endif
if combobox get selected item(cb2) = 1
textitalic = 0
textunderline = 0
textstrikeout = 0
textbold = 1
endif
if combobox get selected item(cb2) = 2
textitalic = 0
textunderline = 0
textstrikeout = 1
textbold = 0
endif
if combobox get selected item(cb2) = 3
textitalic = 1
textunderline = 0
textstrikeout = 0
textbold = 0
endif
if combobox get selected item(cb2) = 4
textitalic = 0
textunderline = 1
textstrikeout = 0
textbold = 0
endif
if combobox get selected item(cb2) = 5
textitalic = 1
textunderline = 0
textstrikeout = 0
textbold = 1
endif
if combobox get selected item(cb2) = 6
textitalic = 0
textunderline = 1
textstrikeout = 0
textbold = 1
endif
if combobox get selected item(cb2) = 7
textitalic = 1
textunderline = 1
textstrikeout = 0
textbold = 0
endif
if combobox get selected item(cb2) = 8
textitalic = 1
textunderline = 1
textstrikeout = 0
textbold = 1
endif
textsize = a
textstyle$ = font$(combobox get selected item(cb1)+1)
window set font e1, textsize, textstyle$, textitalic, textunderline, textstrikeout, textbold
window set font e3, textsize, textstyle$, textitalic, textunderline, textstrikeout, textbold
delete window fw
fontwindow = 0
endif
if button clicked(fw_bt1) or escapekey()
while button clicked(fw_bt1) or escapekey()
endwhile
delete window fw
fontwindow = 0
endif
endwhile
enable window dbpro_w
window to front
endfunction