IonicWind Software

IWBasic => General Questions => Topic started by: Andy on September 09, 2020, 05:43:57 AM

Title: Show / Hide puzzle
Post by: Andy on September 09, 2020, 05:43:57 AM
Hi,

I have a control called "Combo88", which is shown when my program starts.

It is defined in my include file as

CONST Combo88 = 2005

It is only hidden when a certain button is clicked along with others.

When you click on another certain button these controls including Combo88 need to be shown again - which they are.....

Except Combo88?

I have changed the CONST value - no joy.
I have renamed it - no joy.
I have moved it's location on screen - no joy.
I have checked both files for when I hide controls - no joy.

:o

Any ideas why this control will not show again?

Thanks,
Andy.
Title: Re: Show / Hide puzzle
Post by: LarryMc on September 09, 2020, 08:18:18 AM
Is it a global variable; i.e. is it defined where the controls that are working are defined?
Are dialogs involved?
Title: Re: Show / Hide puzzle
Post by: Andy on September 09, 2020, 10:04:37 PM
Larry,

It is a combo box control (global).

Some controls are defined (global) in the main program, others are defined (global) in the include file.

This combo box is in the include file along with some others - the other ones show / hide no problem.

CONST Combo2 = 2000
CONST SubJump = 2001
CONST StartSub = 2002
CONST EndSubb = 2003
CONST SubStatic = 2004
const Combo88 = 2005   '<------------------------------ This one
CONST Combo4 = 2100

The control is created in the main program exactly the same as Combo2 and Combo4.

CONTROL w1,@COMBOBOX,"",760,73,160,500,@CTCOMBODROPDOWN|@VSCROLL|@CTCOMBOSORT|SS_NOTIFY|@TABSTOP,Combo88
SETFONT w1,"Arial",12,400,0,Combo88

I tried defining it in the main program but still no joy....
Title: Re: Show / Hide puzzle
Post by: LarryMc on September 09, 2020, 11:42:06 PM
are you defining another const with that same number 2005 somewhere?

If you want, you can email me your code and I'll be happy to look at it.
Title: Re: Show / Hide puzzle
Post by: Andy on September 10, 2020, 01:14:29 AM
Thanks Larry,

Will do, have to go out right now so it will be later - thanks again.

Andy.
Title: Re: Show / Hide puzzle
Post by: LarryMc on September 10, 2020, 06:54:16 PM
Sorry it took so long for me to get back to you. I had a Dr's  appointment and and one with the Heart failure clinic today.  Plus I did a lot of head scratching looking at your program before the problem hit me right between the eyes.

The problem is in your DoRestore sub and in the "Get Includes " loop section
you execute a
ConDrawOff(w1,Combo88) at the beginning of the loop to speed up the process
and then at the end of the loop you execute
ConDrawOff(w1,Combo88)
again
instead of a ConDrawOn(w1,Combo88)
Change that one statement and it comes and goes like it is suppose to.
Title: Re: Show / Hide puzzle
Post by: Andy on September 10, 2020, 11:52:20 PM
Bingo!

Thanks Larry, I know what happened now.

Two weeks ago I was adding into the program conDrawOff & conDrawOn, I was pasting conDrawOff then changing the second one to On.

I missed this change! and it's only now that I'm hiding / showing controls it came about.

Yes, there will be a lot of head scratching, it's a complicated program and not documented yet.

Thanks again!
Andy.