Page 1 of 1
MultiLine StaticText
Posted: Fri Apr 04, 2008 3:49 pm
by Capella
What is the equivalent to the object "StaticText" (MultiLine) that is found in VisualBasic? I cannot see anything similar in the "Visual Designer". Is there any better designer tool than "Visual Designer"?
Posted: Fri Apr 04, 2008 4:18 pm
by Trond
The TextGadget() supports new lines as well (maybe not in the visual designer).
The simplest is to not use the visual designer and just write the code by hand:
Code: Select all
OpenWindow(0, 0, 0, 512, 384, "", #PB_Window_ScreenCentered | #PB_Window_SystemMenu)
CreateGadgetList(WindowID(0))
TextGadget(0, 10, 10, 200, 200, "First line" + #CRLF$ + "Second line")
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
Break
EndSelect
ForEver
Different fonts in a TextGadget
Posted: Sat Apr 05, 2008 8:45 am
by Capella
Thanks!
BTW. Is it possible to combine different fonts in a string that is printed in a TextGadget?
Posted: Sat Apr 05, 2008 12:44 pm
by Trond
No, you need to use an EditorGadget() or ScintillaGadget() to do that.