I would like to see an option to select a different font color for each msLabel. E.g. have one label blue, one label read and one label green. And the ability to make msLabels in the dialog clickable just like the image. Yes I know I can accomplish the same with an image but that would mean I have to first create and then import the image.
Thank you for a great product.
Option to make msLabel clickable and different font colors
Moderators: Dorian (MJT support), JRL
- Marcus Tettmar
- Site Admin
- Posts: 7380
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
You can set the font style/size/colour with the SetDialogObjectFont function introduce in v10.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Selectable label sample script
Here is a script that appears to provide a selectable label. It is actually a label and an image definition occupying the same space. The image doesn't even exist. No need to precreate any images. The entire image specification area is available for selection so make the image area big enough to cover the label.
-- This script requires Macro Scheduler Version 10
-- The label must appear in the dialog before the image.
Hope this is helpful
-- This script requires Macro Scheduler Version 10
-- The label must appear in the dialog before the image.
Hope this is helpful
Code: Select all
Dialog>Dialog1
Caption=Try this
Width=400
Height=200
Top=278
Left=366
Label= ,74,90,
Image=c:\noimage.bmp,74,90,250,20,,200
Button=Do Not Select this button,68,18,260,40,100
EndDialog>Dialog1
RGB>0,0,255,color
SetDialogObjectFont>Dialog1,msLabel1,Arial,20,0,%color%
SetDialogObjectFont>Dialog1,msButton1,Arial,15,1,255
Show>Dialog1
Let>dialog1.mslabel1=Pick this text instead
Label>Loop
GetDialogAction>dialog1,res1
If>res1=2,EOF
If>res1=100
SetDialogObjectFont>Dialog1,msLabel1,Arial,14,0,255
Let>dialog1.mslabel1=Do you ever follow directions?
ResetDialogAction>dialog1
EndIf
If>res1=200
SetDialogObjectFont>Dialog1,msLabel1,Arial,20,0,%color%
Let>dialog1.mslabel1=Good... That worked
ResetDialogAction>dialog1
Wait>2
Let>dialog1.mslabel1=Pick this text instead
ResetDialogAction>dialog1
EndIf
Wait>0.01
Goto>Loop
Label>EOF