Page 1 of 2
[5.10] : Form Designer - StringGadget and #PB_Text_Center
Posted: Sun Feb 24, 2013 9:34 am
by Maitre_Kanter
Hello Purebasic Team,
Is it possible to Add #PB_Text_Center property in Form Designer for StringGadGet ?
TIA
Arnaud
Re: [5.10] : Form Designer - StringGadget and #PB_Text_Cent
Posted: Sun Feb 24, 2013 9:45 am
by MachineCode
No, because that Gadget doesn't officially support it. Look in the manual.

Re: [5.10] : Form Designer - StringGadget and #PB_Text_Cent
Posted: Sun Feb 24, 2013 11:13 am
by Maitre_Kanter
MachineCode wrote:No, because that Gadget doesn't officially support it. Look in the manual.

Not "Officially supported" but Purebasic supports it.
The manual doesn't mention this feature (may be the manual is not comprehensive)
Try this :
Code: Select all
StringGadget(#gadget, 10,10, 200, 20,"test", #PB_Text_Center)
Re: [5.10] : Form Designer - StringGadget and #PB_Text_Cent
Posted: Sun Feb 24, 2013 12:05 pm
by Fred
It's just luck that it is working. Try it on OS X and Linux and it will not work.
Re: [5.10] : Form Designer - StringGadget and #PB_Text_Cent
Posted: Sun Feb 24, 2013 12:25 pm
by ts-soft
Maitre_Kanter wrote:Not "Officially supported" but Purebasic supports it.
No, it works only because #PB_TextRight and #ES_RIGHT have by chance the same value on windows

Re: [5.10] : Form Designer - StringGadget and #PB_Text_Cent
Posted: Sun Feb 24, 2013 1:05 pm
by Polo
As it's not supported I can't add it sorry!
Re: [5.10] : Form Designer - StringGadget and #PB_Text_Cent
Posted: Sun Feb 24, 2013 1:17 pm
by ts-soft
Polo wrote:As it's not supported I can't add it sorry!
I think, you can add some default API constants OS dependent!
For example #ES_RIGHT for stringgadget
Because the code is generated always new, I hold this even for necessary.
Greetings - Thomas
Re: [5.10] : Form Designer - StringGadget and #PB_Text_Cent
Posted: Sun Feb 24, 2013 2:09 pm
by Polo
No, the form designer generates cross platform code only.
Re: [5.10] : Form Designer - StringGadget and #PB_Text_Cent
Posted: Sun Feb 24, 2013 2:28 pm
by ts-soft
Why not add simple a numeric field for flags?
Generates: #PB_Bla | numericvalue
For all gadgets, that support flags.
Re: [5.10] : Form Designer - StringGadget and #PB_Text_Cent
Posted: Sun Feb 24, 2013 2:59 pm
by MachineCode
A big +1 for an empty field for custom flags, both for windows and gadgets. It won't stop cross-platform development, because the coder can decide whether to use it or not, and/or the designer could just ignore it when generating for Linux/Mac. The old Visual Designer supported such a field, IIRC. It'd be easy enough for you to add, too.

Re: [5.10] : Form Designer - StringGadget and #PB_Text_Cent
Posted: Sun Feb 24, 2013 3:28 pm
by Polo
I'll wait to see what Fred thinks about this

Re: [5.10] : Form Designer - StringGadget and #PB_Text_Cent
Posted: Sun Feb 24, 2013 8:31 pm
by luciano
+1 for an empty field whose text is added to flags.
With a text field you could also add more than one flag, e.g. : "#PB_....|#WS_...."
Re: [5.10] : Form Designer - StringGadget and #PB_Text_Cent
Posted: Sun Apr 14, 2013 8:16 am
by Maitre_Kanter
+1 for an empty field whose text is added to flags.
With a text field you could also add more than one flag, e.g. : "#PB_....|#WS_...."
Re: [5.10] : Form Designer - StringGadget and #PB_Text_Cent
Posted: Tue Nov 04, 2014 5:55 pm
by jassing
+1 on allowing user specified values and/or constants.
There are windows-only functions, so the argument of "windows only constants" fails; as pb does have windows specific functions...
Re: [5.10] : Form Designer - StringGadget and #PB_Text_Cent
Posted: Tue Nov 04, 2014 7:50 pm
by Maitre_Kanter
+1