Page 1 of 1
Posted: Mon Apr 29, 2002 2:49 pm
by BackupUser
Restored from previous forum. Originally posted by tinman.
Would it be possible to have an alternative command for creating option gadgets? One where you only need to specify the command once, with all the options you want in the text for it, like the GTMX command in BlitzBasic2 (or whatever the NCS equivalent was - OptionGadget I think

. Something like this for those who don't know what I'm blubbering about:
Where Text$ is all the options you want displayed separated by some character.
Disclaimer: this was someone elses request, not mine
--
It's not minimalist - I'm increasing efficiency by reducing input effort.
Posted: Mon Apr 29, 2002 6:31 pm
by BackupUser
Restored from previous forum. Originally posted by PB.
> OptionGadget ID,x,y,w,h,Text$
> Where Text$ is all the options you want displayed separated by some character.
An OptionGadget can only have ONE option... do you perhaps mean a ListGadget?
PB - Registered PureBasic Coder
Edited by - PB on 29 April 2002 19:31:49
Posted: Mon Apr 29, 2002 6:56 pm
by BackupUser
Restored from previous forum. Originally posted by tinman.
> OptionGadget ID,x,y,w,h,Text$
> Where Text$ is all the options you want displayed separated by some character.
An OptionGadget can only have ONE option... do you perhaps mean a ListGadget?
No, I mean an OptionGadget (when was the last time you used an option gadget by itself? And even if you did, the user can only turn it on but not off). Both the following pieces of code produce the same result (in terms of gadgets on your GUI):
Code: Select all
; This is the command to create option gadgets in BlitzBasic2
GTMX 0,1,20,20,200,14,"",0,"foo|bar|blah|last one"
; This is PB style
OptionGadget 1,20,20,200,14,"foo"
OptionGadget 2,20,20,200,14,"bar"
OptionGadget 3,20,20,200,14,"blah"
OptionGadget 4,20,20,200,14,"last one"
The GUI they create will look something like this:
--
It's not minimalist - I'm increasing efficiency by reducing input effort.
Posted: Mon Apr 29, 2002 7:29 pm
by BackupUser
Restored from previous forum. Originally posted by PB.
> when was the last time you used an option gadget by itself?
I meant that an OptionGadget can have only ONE text with it, so if you wanted
to show 3 options, you'd need 3 x OptionGadgets, just as you showed in your
PureBasic example. BTW, Visual Basic does it the same way as PureBasic.
PB - Registered PureBasic Coder
Posted: Mon Apr 29, 2002 7:54 pm
by BackupUser
Restored from previous forum. Originally posted by Andre.
I still think its worth to do a OptionGadget with parameter "Option1|Option2|Option3". It was my suggestion to Tinman to ask for....
Fred - what do you mean about our Amiga basics ?
Regards
André
*** German PureBasic Support ***
Posted: Mon Apr 29, 2002 9:04 pm
by BackupUser
Restored from previous forum. Originally posted by PB.
> its worth to do a OptionGadget with parameter "Option1|Option2|Option3".
Unfortunately it can't be done like that in Windows. An OptionButton, in
Windows, is a single item entity, with a single set of properties (hWnd,
X, Y, W, H, Caption$). It's like that in VB and C++ also.
What you're asking could be done by Fred, but would require a bit of effort.
He'd have to read the code, then create separate OptionButtons for each
parameter in the code. So you'd still end up with separate OptionButtons
in the end. It's not worth doing...
PB - Registered PureBasic Coder
Posted: Mon Apr 29, 2002 11:41 pm
by BackupUser
Restored from previous forum. Originally posted by fred.
The big problem is you can't do such stuff:
o Helllo o Or not
Or:
o Hello
o Haha, I'm here.
Fred - AlphaSND