Re: hide a key in before field clause of input statement

Bruce Thelen <[email protected]> Thu, 08 Jun 2006 12:03:56 -0700
Newsgroups gmane.comp.lang.4gl.fourjs.user
Message-ID <[email protected]>
Sunil - I just did this yesterday.  The technique below will work on the 
assumption the name of the form is a known constant.  In the code the 
form is named either "print_ctrl" or "rpt_format", the same function is 
called from each, in the case of "print_ctrl" the form does not have the 
  detail section to switch to, and so the menu button must be hidden.

define
     w ui.Window,
     d om.DomNode

before input
     -- Determine the calling form; if it's the short form (print_ctrl),
     -- disable/hide the hdr_detail button.
     let w = ui.Window.getCurrent()
     let d = w.findNode("Form", "print_ctrl")
     if d is not null then
         -- We were called from the short form
         call dialog.setActionHidden("hdr_detail", TRUE)
     end if

HTH,
Bruce Thelen
Shipwreck Beads

Sunil Muppalla wrote:
> I want to hide a menu button in the before clause of input statement
> 
> Any suggestions?
> 
>  
> 
> Thanks
> 
> Sunil
>