Hi,
Maybe this topic can help you?
http://www.thinbasic.com/community/s...nt-for-a-label
catventure.
I want to use a Dialog (first time). I want to increase the FontSize on a label.
A relevant msdn Reference
This reference has:
btn3.FontSize = 10.0
-- SO -- is there an API I could use for the Label FontSize?
Thanks in advance.
Uses "UI" Global hdlg As DWord Sub TBMain() Dialog New Pixels, 0, "Dialog Window", 40, 30, 400, 300, 0 To hdlg Dialog Set Color hdlg, -1, Rgb(200, 200, 100) Control Add Label, hdlg, 1001, "Label text here", 10, 10, 180, 20 ' at this point I want to set the label fontsize Control Add Button, hDlg, 1002, "Hit me to exit", 10, 40, 180, 20 Call cb1 Dialog Show Modal hdlg End Sub CallBack Function cb1() As Long Dialog End hdlg End Function
Hi,
Maybe this topic can help you?
http://www.thinbasic.com/community/s...nt-for-a-label
catventure.
http://tab.thinbasic.com - Home Of The ThinBasic Adventure Builder Project. (Interactive Fiction/Text Adventure Maker)
[deleted -- a poor example]
Last edited by dcromley; 23-01-2016 at 01:43.
I didn't read your link (Petr's) carefully enough -- it is simpler, better, doesn't use CreateFont:
(I can't believe my earlier searches didn't find this -- I was using "size", I guess)
Uses "UI" Global hDlg As DWord Sub TBMain() Dialog New Pixels, 0, "Dialog Window", 40, 30, 400, 300, 0 To hDlg Dialog Set Color hDlg, -1, Rgb(240, 240, 160) Control Add Label, hDlg, 1001, "Label One - Default", 10, 10, 180, 20 Control Add Label, hDlg, 1002, "Label Two - Whatever", 10, 40, 180, 20 Dim hFont As DWord Resource = Font_Create("Arial Black", 12) Control Send hDlg, 1002, %WM_SETFONT, hFont, 0 Control Add Button, hDlg, 1003, "Hit me to exit", 10, 70, 180, 20 Call cbexit Dialog Show Modal hDlg End Sub CallBack Function cbexit() As Long Dialog End hDlg End Function
Last edited by dcromley; 23-01-2016 at 01:34. Reason: add "I can't believe .."
Bookmarks