[5.10] : Form Designer - StringGadget and #PB_Text_Center

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Maitre_Kanter
User
User
Posts: 84
Joined: Mon Sep 06, 2010 3:05 pm

[5.10] : Form Designer - StringGadget and #PB_Text_Center

Post by Maitre_Kanter »

Hello Purebasic Team,

Is it possible to Add #PB_Text_Center property in Form Designer for StringGadGet ?

TIA
Arnaud
MachineCode
Addict
Addict
Posts: 1482
Joined: Tue Feb 22, 2011 1:16 pm

Re: [5.10] : Form Designer - StringGadget and #PB_Text_Cent

Post by MachineCode »

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!
Maitre_Kanter
User
User
Posts: 84
Joined: Mon Sep 06, 2010 3:05 pm

Re: [5.10] : Form Designer - StringGadget and #PB_Text_Cent

Post 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)
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: [5.10] : Form Designer - StringGadget and #PB_Text_Cent

Post by Fred »

It's just luck that it is working. Try it on OS X and Linux and it will not work.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: [5.10] : Form Designer - StringGadget and #PB_Text_Cent

Post 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 :wink:
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.
Image
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: [5.10] : Form Designer - StringGadget and #PB_Text_Cent

Post by Polo »

As it's not supported I can't add it sorry!
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: [5.10] : Form Designer - StringGadget and #PB_Text_Cent

Post 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 :wink:
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.
Image
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: [5.10] : Form Designer - StringGadget and #PB_Text_Cent

Post by Polo »

No, the form designer generates cross platform code only.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: [5.10] : Form Designer - StringGadget and #PB_Text_Cent

Post by ts-soft »

Why not add simple a numeric field for 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.
Image
MachineCode
Addict
Addict
Posts: 1482
Joined: Tue Feb 22, 2011 1:16 pm

Re: [5.10] : Form Designer - StringGadget and #PB_Text_Cent

Post 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. ;)
Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: [5.10] : Form Designer - StringGadget and #PB_Text_Cent

Post by Polo »

I'll wait to see what Fred thinks about this :)
luciano
Enthusiast
Enthusiast
Posts: 151
Joined: Wed Mar 09, 2011 8:25 pm

Re: [5.10] : Form Designer - StringGadget and #PB_Text_Cent

Post 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_...."
Maitre_Kanter
User
User
Posts: 84
Joined: Mon Sep 06, 2010 3:05 pm

Re: [5.10] : Form Designer - StringGadget and #PB_Text_Cent

Post 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_...."
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

Re: [5.10] : Form Designer - StringGadget and #PB_Text_Cent

Post 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...
Maitre_Kanter
User
User
Posts: 84
Joined: Mon Sep 06, 2010 3:05 pm

Re: [5.10] : Form Designer - StringGadget and #PB_Text_Cent

Post by Maitre_Kanter »

+1
Post Reply