May 19, 2024, 07:56:25 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Using Buttons

Started by CodeTRUCKER, December 28, 2010, 03:37:58 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

CodeTRUCKER

Howdy,

I have spent the last couple of hours weeding through three searches on buttons, command control, @IDCONTROL, program examples, etc. and I am presently reading through all 42 pages of IWBASIC>>General Questions.  Ok, I know I sound like an idiot, but if I don't ask how to use what has to be the most common control know to coding GUI's, I'll remain an idiot!   ;D

Simply, where can I find some information/examples on using the button control?

Thanks for the help!
Calvin 
Calvin Waterbury


Truth, unlike opinion, tradition, etc. will always be able to stand on its own.  Truth is not a static, but a living entity and will perpetually impart life; therefore, any "truth" that does not or can not impart life can not be Truth.

LarryMc

December 28, 2010, 05:07:32 PM #1 Last Edit: December 28, 2010, 05:38:44 PM by Larry McCaughn
the easiest way to find examples of how to use buttons is:

open the IDE and select "Tools/Find in Files" from the main menu bar.
when the dialog opens
enter "@button" in the find what box
enter either "*.eba" or "*.iwb" (depends on which you have)
select the path to where all of your EB\IWB examples are located.

When I do that I get 163 hits.

the other way is:
open the IDE
select the "New Dialog" toolbar button (2nd from right. no, my other right (left)
add a button to the dialog
click the "Generate Source" button
when the dialog opens
check the Generate skelton handler checkbox
select the open in new window radiobutton.
click okay.
a file will be opened showing you how the button is implemented.

LarryMc

LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

CodeTRUCKER

December 28, 2010, 05:37:54 PM #2 Last Edit: December 28, 2010, 06:01:52 PM by CodeTRUCKER
WARNING! to anyone using the second method below... be very, very careful!

The offering made by LarryM above is good and valid, but somehow my dialog file ended up named the same as my program file. 
End result = my program file was overwritten and AFAICT three weeks of work was lost.  Please be careful. (yes, yes I know about backups!)


Quote from: Larry McCaughn on December 28, 2010, 05:07:32 PM
the easiest way to find examples of how to use buttons is:

open the IDE and select "Tools/Find in Files" from the main menu bar.
when the dialog opens
enter "@button" in the find what box
enter either "*.eba" or "*.iwb" (depends on which you have)
select the path to where all of your EB\IWB examples are located.

When I do that I get 163 hits.

I pegged 92!  That is once I found the right folder. >_<

Quotethe other way is:
open the IDE
select the "New Dialog" toolbar button (2nd from right.
add a button to the dialog
click the "Generate Source" button
when the dialog opens
check the Generate skelton handler checkbox
select the open in new window radiobutton.
click okay.
a file will be opened showing you how the button is implemented.

LarryMc



Kudos!  This has not only helped with THIS question, but has provided me another tool for the toolbox!  Thank you very much for taking the time to reply so astutely!

Gratefully,
Calvin

PS - We've now added a "using buttons" resource to this forum! <thumbs up>
Calvin Waterbury


Truth, unlike opinion, tradition, etc. will always be able to stand on its own.  Truth is not a static, but a living entity and will perpetually impart life; therefore, any "truth" that does not or can not impart life can not be Truth.

LarryMc

glad I could help.

LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

LarryMc

December 28, 2010, 09:37:04 PM #4 Last Edit: December 28, 2010, 09:46:02 PM by Larry McCaughn
Quote from: CodeTRUCKER on December 28, 2010, 05:37:54 PM
WARNING! to anyone using the second method below... be very, very careful!

The offering made by LarryM above is good and valid, but somehow my dialog file ended up named the same as my program file.  
End result = my program file was overwritten and AFAICT three weeks of work was lost.  Please be careful. (yes, yes I know about backups!)



When you do what I said it will open a file called "EBASIC1.eba"(or some subsequent # for each one opened in a session)..
In IWBasic it will be "IWBASIC1.iwb"
There's only two ways to save it over another file:
1. Another file is already named EBASIC1.eba or
2. You did a save-as and picked another files name.

In both cases you are asked if you really want to over write the existing file.

LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library