Normal Topic Visibility not working on some elements (Read 1007 times)
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Visibility not working on some elements
Jul 16th, 2004 at 2:47am
Print Post Print Post  
Before I spend too much more time, is this a feature or a bug?

I cannot make Radio Button groups invisible.
I cannot make Buttons invisible.

I was expecting to be able to use Visibility on all elements on the form. The Programming Guide only mentions "layout element" on page 168, no mention of exceptions.  Is there a listing of elements that can and cannot be controlled with Visibiilty.  Or is this a real problem to be corrected?

Will the elements on this list (if it exists) also not work with other "GUI Interface" types of functions like Color, Label, Position and Dimension tools?





  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Visibility not working on some elements
Reply #1 - Jul 16th, 2004 at 12:12pm
Print Post Print Post  
Quote:
Before I spend too much more time, is this a feature or a bug?

I cannot make Radio Button groups invisible.
I cannot make Buttons invisible.


We can make both Radio Button Groups and Command Buttons invisible using the Visibilty command.  Is there another piece of your programming that is making them visible again?
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Visibility not working on some elements
Reply #2 - Jul 16th, 2004 at 12:33pm
Print Post Print Post  
BTW, whenever you affect the GUI, you should call ForceRedraw() after making all your settings, to force the screen to refresh.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Visibility not working on some elements
Reply #3 - Jul 16th, 2004 at 4:40pm
Print Post Print Post  
Code is straight forward.  I don't see any issues.  Perhaps the obvious is just not hitting me in the head again?
======================
Sub Routine srClearAllMenus() is in Global Code section.

SubRoutine srShowThisMenu() is in On Entry for a button element named btnAddItems. 

Quote:
SubRoutine srClearAllMenus()

     VISIBILITY(btnMenuA1,0)
     VISIBILITY(btnMenuA2,0)
     VISIBILITY(btnMenuA3,0)
     VISIBILITY(btnMenuA4,0)
     VISIBILITY(btnMenuB1,0)
     VISIBILITY(btnMenuB2,0)
     VISIBILITY(btnMenuB3,0)
     VISIBILITY(btnMenuB4,0)
     VISIBILITY(btnMenuC1,0)
     VISIBILITY(btnMenuC2,0)
     VISIBILITY(btnMenuC3,0)
     VISIBILITY(btnMenuC4,0)
     VISIBILITY(grpMenuA,0)
     VISIBILITY(grpMenuB,0)
     ForceRedraw()

End SubRoutine

===============================
SubRoutine srShowThisMenu()

     srClearAllMenus()

     VISIBILITY(btnAddNouns,0)
     VISIBILITY(btnAddVerbs,0)

     VISIBILITY(grpMenuA,1)

     VISIBILITY(btnMenuA1,1)
     VISIBILITY(btnMenuA2,1)
     VISIBILITY(btnMenuA3,1)
     VISIBILITY(btnMenuA4,1)

     ForceRedraw()

End SubRoutine

Not all elements are on same Tab.  The slements btnAdd*. are on the same tab as btnAddItems that triggers the actions.  The btnMenu* and grpMenu* items are on Tab page 2.

Version 1.0.4.  All elements created from Element Adder, not from Database Manager.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Visibility not working on some elements
Reply #4 - Jul 16th, 2004 at 4:52pm
Print Post Print Post  
I don't see anything obviously wrong with your code, but I also can't really tell where things are or what is happening/supposed to be happening. From what I can see, after btnAddItems is clicked, all MenuA elements should be visible. The other Menu elements and a couple of Add buttons should be invisible.

We tried putting elements on Tabs and it's working fine for us.

If you want to send your app in to Support, we'll take a look at what's happening and see if we can spot the problem.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Visibility not working on some elements
Reply #5 - Jul 16th, 2004 at 5:30pm
Print Post Print Post  
BTW, are you sure your code is actually running? Just having the srShowThisMenu() subroutine defined in the OnEntry event of a button does not actually cause it to run when the button is clicked. You still have to call it after defining it.

MyButton::OnElementEntry
[code]Subroutine MySub()
   Do stuff...
End Subroutine

MySub()[/code]
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Visibility not working on some elements
Reply #6 - Jul 16th, 2004 at 6:18pm
Print Post Print Post  
Has been sent in....thanks for looking at it.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Visibility not working on some elements
Reply #7 - Jul 16th, 2004 at 6:22pm
Print Post Print Post  
AAArgh!.....just saw your note re calling the SubRoutine....

That was it!.......working fine!

Dummy ME  Embarrassed Embarrassed Embarrassed
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged