Hello,
Currently I can force the justification when creating a StringGadget with ES_LEFT # / # ES_CENTER / # ES_RIGHT.
But when creating a GUI with the Dialog library, these flags are not allowed and causes a compiler error.
Would it be possible to integrate a # PB_Text_Left | Center | Right crossplatform, for StringGagdet like TextGadget?
Thanks,
Bye
Justify StringGadget and Dialog Library
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: Justify StringGadget and Dialog Library
Those flags already work for Windows apps (unofficially), so perhaps it is a difficult thing on one of the other OS. Certainly would be a welcome enhancement for regular forms, never mind the new dialog.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: Justify StringGadget and Dialog Library
For now, you can declare these constants as "Runtime" and then use it in the XML flags.
Re: Justify StringGadget and Dialog Library
Arf, I did not understand all the subtleties of Runtime .
Re: Justify StringGadget and Dialog Library
in your code before loading the XML dialog:
the you can use it in the XML.
Code: Select all
Runtime #ES_CENTER
Re: Justify StringGadget and Dialog Library
If it's like this, it doesn't works.
xml
Code: Select all
#Xml = 0
#Dialog = 0
Runtime #ES_CENTER
If LoadXML(#Xml, "Data/test.xml") And XMLStatus(#Xml) = #PB_XML_Success
CreateDialog(#Dialog)
If OpenXMLDialog(#Dialog, #Xml, "Test")
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
Else
Debug "Dialog creation error: " + DialogError(#Dialog)
EndIf
Else
Debug "XML error on line " + XMLErrorLine(#Xml) + ": " + XMLError(#Xml)
EndIf
Code: Select all
<?xml version="1.0" ?>
<!-- Window -->
<window flags="#PB_Window_SizeGadget | #PB_Window_MaximizeGadget | #PB_Window_MinimizeGadget" id="0" minheight="auto" minwidth="auto" name="Test" text="Test">
<hbox>
<string name="name" text="string" flags="#ES_CENTER"/>
</hbox>
</window>
Re: Justify StringGadget and Dialog Library
Any news ?
Re: Justify StringGadget and Dialog Library
I agree, having the ability to right justify the text in a StringGadget would be very useful.
Also, if a TextGadget has an attribute of "Single Line", the text in the TextGadget should be centered vertically.
Also, if a TextGadget has an attribute of "Single Line", the text in the TextGadget should be centered vertically.