Post by regoroxford on Mar 13, 2023 19:53:18 GMT -5
I feel stupid for expecting the text size to change after the window containing the listbox is opened. Font commands must follow window open command! Assuming agreement on my expectations ; how do you control text size of the words following options$? I can Only discover lip service on this topic.
[setup.1.Window]
'-----Begin code for #1
nomainwin
WindowWidth = 550
WindowHeight = 410
UpperLeftX=int((DisplayWidth-WindowWidth)/2)
UpperLeftY=int((DisplayHeight-WindowHeight)/2)
'-----Begin GUI objects code
ListboxColor$ = "green"
options$(0) = "Coldcontact phone call"
options$(1) = "Send Literature"
options$(2) = "Follow Up Call"
options$(3) = "Send Promotional"
options$(4) = "Final Call"
listbox #1.list, options$(), [selectionMade], 5, 35, 250, 120
button #1.list "Continue", [selectionMade], UL, 5, 5,60,30
button #1.list "Cancel", [cancelSelection], UR, 15, 5,60,30
WindowWidth = 270 : WindowHeight = 180
open "Select a contact " for window as #1
'#1.list "font arial 14" 'does not work
chosefont$="arial 14" 'copied from Metro
listfont$="font "+chosenfont$
#1.list ,listfont$
wait
[selectionMade]
print #1.list, "selection? selection$"
notice selection$ + " was chosen"
close #1
end
[cancelSelection]
notice " selection cancelled"
close #1
end
'-----End GUI objects code
open "untitled" for window as #1
print #1, "font ms_sans_serif 20"
print #1, "trapclose [quit.1]"
[1.inputLoop] 'wait here for input event
wait
[listbox1DoubleClick] 'Perform action for the listbox named 'listbox1'
wait
[quit.1] 'End the program
close #1
end