[5.10] : Form Designer - StringGadget and #PB_Text_Center
-
- User
- Posts: 84
- Joined: Mon Sep 06, 2010 3:05 pm
[5.10] : Form Designer - StringGadget and #PB_Text_Center
Hello Purebasic Team,
Is it possible to Add #PB_Text_Center property in Form Designer for StringGadGet ?
TIA
Arnaud
Is it possible to Add #PB_Text_Center property in Form Designer for StringGadGet ?
TIA
Arnaud
-
- Addict
- Posts: 1482
- Joined: Tue Feb 22, 2011 1:16 pm
Re: [5.10] : Form Designer - StringGadget and #PB_Text_Cent
No, because that Gadget doesn't officially support it. Look in the manual. 

Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
PureBasic: Born in 1998 and still going strong to this very day!
-
- User
- Posts: 84
- Joined: Mon Sep 06, 2010 3:05 pm
Re: [5.10] : Form Designer - StringGadget and #PB_Text_Cent
Not "Officially supported" but Purebasic supports it.MachineCode wrote:No, because that Gadget doesn't officially support it. Look in the manual.
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
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
No, it works only because #PB_TextRight and #ES_RIGHT have by chance the same value on windowsMaitre_Kanter wrote:Not "Officially supported" but Purebasic supports it.

PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Re: [5.10] : Form Designer - StringGadget and #PB_Text_Cent
As it's not supported I can't add it sorry!
Re: [5.10] : Form Designer - StringGadget and #PB_Text_Cent
I think, you can add some default API constants OS dependent!Polo wrote:As it's not supported I can't add it sorry!
For example #ES_RIGHT for stringgadget

Because the code is generated always new, I hold this even for necessary.
Greetings - Thomas
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Re: [5.10] : Form Designer - StringGadget and #PB_Text_Cent
No, the form designer generates cross platform code only.
Re: [5.10] : Form Designer - StringGadget and #PB_Text_Cent
Why not add simple a numeric field for flags?
Generates: #PB_Bla | numericvalue
For all gadgets, that support flags.
Generates: #PB_Bla | numericvalue
For all gadgets, that support flags.
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

-
- Addict
- Posts: 1482
- Joined: Tue Feb 22, 2011 1:16 pm
Re: [5.10] : Form Designer - StringGadget and #PB_Text_Cent
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. 

Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
PureBasic: Born in 1998 and still going strong to this very day!
Re: [5.10] : Form Designer - StringGadget and #PB_Text_Cent
I'll wait to see what Fred thinks about this 

Re: [5.10] : Form Designer - StringGadget and #PB_Text_Cent
+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_...."
With a text field you could also add more than one flag, e.g. : "#PB_....|#WS_...."
-
- User
- Posts: 84
- Joined: Mon Sep 06, 2010 3:05 pm
Re: [5.10] : Form Designer - StringGadget and #PB_Text_Cent
+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_...."
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
+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...
There are windows-only functions, so the argument of "windows only constants" fails; as pb does have windows specific functions...
-
- User
- Posts: 84
- Joined: Mon Sep 06, 2010 3:05 pm