IonicWind Software

IWBasic => General Questions => Topic started by: Andy on September 11, 2009, 02:59:06 AM

Title: hide - show a button in a window
Post by: Andy on September 11, 2009, 02:59:06 AM
Hi Everyone,

Has anybody got an example of how to hide a button and then later show the button again in a window ? I have looked at the example programs and searched the forum but cannot find what i'm looking for, or maybe i'm overlooking something simple ?

What I want to is:

1. open a window - no problem
2. Print some information in the window - no problem
3. have two buttons that say "Next" and "Previous" - no problem

ok no problems so far

When you click "next" it clears the window of any information and reads then displays the next record, same for the "previous" button - again no problem

Depending on the criteria of what is printed, I want a button called "Enable" to be either hidden or to be shown in the window when you click "next" or "previous" - the only way I can do this at the moment is to close and then re-open the window.

Please any help would be great,
Andy.

Title: Re: hide - show a button in a window
Post by: LarryMc on September 11, 2009, 05:13:08 AM
See the SHOWWINDOW command in the help file.

create the control then use

SHOWWINDOW mywnd, @SWHIDE, mycontrol

SHOWWINDOW mywnd, @SWRESTORE, mycontrol
or
SHOWWINDOW mywnd, @SWSHOW, mycontrol


Larry
Title: Re: hide - show a button in a window
Post by: Andy on September 11, 2009, 07:19:40 AM
Hi Larry,

Thanks very much, yes it works of course !

Just couldn't see the wood for the trees.

Thanks again !!!!
Andy.