Page Index Toggle Pages: 1 [2]  Send Topic Send Topic Print Print
Hot Topic (More than 10 Replies) @HideTreeItem - Search Menu (Read 3626 times)
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: @HideTreeItem - Search Menu
Reply #15 - May 6th, 2005 at 3:52pm
Print Post Print Post  
You probably don't need this one:
In the Employee Form - On Form Change

As to the other problem, try something like this:
Code
Select All
GLOBAL CODE
RunExitProgrammingOnCloseForm(1)

On Form Exit
If @FormWillClose() = 1
{
	  CloseCommandArea(0)
}
 



If you have other On Form Exit programming, you may need a flag to prevent it from running when you don't want it to.  The code above is off the top of my head, but give it a try.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Louis Galvao
Full Member
***
Offline


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Re: @HideTreeItem - Search Menu
Reply #16 - May 6th, 2005 at 6:09pm
Print Post Print Post  
I removed the On Form Change code and you were right - I don't need this.

I inserted your code and removed my code from On Form exit and it operates in the same manner as before i.e. it closes the App Menu when you enter the form and hit escape immediately.   

I hope we go thru the programming guide from top to bottom at the upcoming training later this month so I can become more familiar with all the available functions and commands.

Thanks,

Louis
  

Louis Galvao
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: @HideTreeItem - Search Menu
Reply #17 - May 6th, 2005 at 7:41pm
Print Post Print Post  
Louis,

You may not be able to catch every case. In general, people either want the command area open or closed, not open in some places and closed in others. SBasic can't see every interface event. There may be certain cases, such as opening Add mode and not typing anything, that bypass any event that would trigger code.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: @HideTreeItem - Search Menu
Reply #18 - May 9th, 2005 at 7:11pm
Print Post Print Post  
Hello Louis,

I've been playing with this and I have come up with a way that catches most cases.

Now the tree will be open during the Search mode. You can close it in the On Retrieve Spec Open event but since there is no On Retrieve Spec Close event and the Form Exit programming does not run when leaving the Retrieve spec, if the user opens Search/Update and hits esc the tree will remain closed.

Code
Select All
** PROGRAMMING SECTION: [Form] [On Form Entry] **
RunExitProgrammingOnCloseForm(1)
CloseCommandArea(1)


** PROGRAMMING SECTION: [Form] [On Form Exit] **
If @FormWillClose() = 1 Then
{
	CloseCommandArea(0)
} 



-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Louis Galvao
Full Member
***
Offline


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Re: @HideTreeItem - Search Menu
Reply #19 - May 9th, 2005 at 8:15pm
Print Post Print Post  
Ray:

Thanks for continuing to look into this.

It appears that it has narrowed it down to only one instance now - if you go into Search/Update and immediately press escape, the command area remains closed in the App Menu.

I can live with this for now as typically you will always do some sort of search/update on a record and if it does happen, you can easily re-open via the View option.

Thanks,

Louis
  

Louis Galvao
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: @HideTreeItem - Search Menu
Reply #20 - May 9th, 2005 at 8:25pm
Print Post Print Post  
Hello Louis,

The Open Command Area being available on the View toolbar is actually a bug that is fixed in the next release.

You can on the other hand just hit enter, then F10 and finally Esc and you will have the command Tree back.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Louis Galvao
Full Member
***
Offline


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Re: @HideTreeItem - Search Menu
Reply #21 - May 9th, 2005 at 8:58pm
Print Post Print Post  
Thanks Ray.

Looking forward to the next release.

Louis

  

Louis Galvao
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send Topic Send Topic Print Print