NetTalk Central

Author Topic: NT8 hide menu when in a form  (Read 2622 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
NT8 hide menu when in a form
« on: April 05, 2014, 08:18:21 AM »
Hi,
How can I hide the PageHeader Menu when the page is a form?
Thanks
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NT8 hide menu when in a form
« Reply #1 on: April 06, 2014, 11:30:08 PM »
there are a few ways I can think of (I haven't tried them though, so you may need to experiment a bit.)

a) on the form properties, advanced tab, set the form to use a different generic header (one without a menu.) This approach is the simplest, but does mean tweaking the setting for all forms.

b) alternatively, a "global" approach, is to embed some code in WebHandler, in the MakePage method. The second parameter there contains the procedure type, in this case you'd be checking for Net:Web:Form
So, you could, for example do something like (BEFORE the parent call);
if p_Type = net:Web:Form
  p_web.SetValue('IsAForm',1)
end


Then set the menu condition to
p_web.GetValue('IsAForm') <> 1

cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: NT8 hide menu when in a form
« Reply #2 on: April 07, 2014, 03:18:06 AM »
Good!
Any way to knos if the form is a memory or a table form?
It seams impossible...
What I trying to do is that the user cant quit a Table Form by cliking on a menu item.
Thanks
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NT8 hide menu when in a form
« Reply #3 on: April 07, 2014, 05:04:43 AM »
the header is generated before it gets to the form, so no, at that stage you can't inspect any properties of the form itself.

If you only want to override some forms, then use the setting on the Advanced tab to select an alternate header.

cheers
Bruce