April 20, 2024, 07:06:29 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Show / Hide puzzle

Started by Andy, September 09, 2020, 05:43:57 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andy

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.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

LarryMc

Is it a global variable; i.e. is it defined where the controls that are working are defined?
Are dialogs involved?
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Andy

September 09, 2020, 10:04:37 PM #2 Last Edit: September 09, 2020, 10:56:58 PM by Andy
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....
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

LarryMc

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.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Andy

Thanks Larry,

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

Andy.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

LarryMc

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.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Andy

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.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.