Normal Topic Button to Open/Close command tree (Read 565 times)
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Button to Open/Close command tree
Feb 6th, 2006 at 8:21pm
Print Post Print Post  
I've been reading Inside Sesame V1#8 (August 2004) and have tried Gordon Meigs programming to add a button which opens and closes the command tree.

Here is the code:
Code
Select All
Main form : On Form Entry
vState=@CloseCommandArea()
If vState = 0 then Label(LE4, "Close Command Tree")
If vState = 1 then Label(LE4, "Open Command Tree") 


Code
Select All
Button : On Element Entry
var vState as int

vState=@CloseCommandArea()

If vState = 0
then
	{
	CloseCommandArea(1)
	Label(LE4, "Open Command Tree")
	}

If vState = 1
then
	{
	CloseCommandArea(0)
	Label(LE4, "Close Command Tree")
	} 



Now here's the thing:  the button label shows up just fine in Add mode, but is not present in Search mode until it gets pressed or the first record is retreived.  I think I'm missing a state.  Can vState be anything other than 1 or 2?
  

**
Captain Infinity
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1350
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Button to Open/Close command tree
Reply #1 - Feb 6th, 2006 at 8:58pm
Print Post Print Post  
The On Form Entry event does not execute in Search mode. To execute code at the Search screen, you need to put it in the "On Retrieve Spec Open" event.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Button to Open/Close command tree
Reply #2 - Feb 6th, 2006 at 9:17pm
Print Post Print Post  
Like a charm!  Thank you very much.
  

**
Captain Infinity
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1350
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Button to Open/Close command tree
Reply #3 - Feb 7th, 2006 at 1:19am
Print Post Print Post  
You're welcome.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged