Page 1 of 1

Sidenav

PostPosted: Thu Mar 30, 2023 3:37 pm
by eugenepenney
Hello All,
how do I get a form to show/load by clicking a sidenav menu.

thank you.
eugene.

Re: Sidenav

PostPosted: Thu Mar 30, 2023 3:56 pm
by rafig
Hi
easiest thing to do might be to play with the Servoy Sample solution, as it does exactly that.
From Help menu, choose 'Download/install with Servoy Package Manager'
Then on 'Solutions' tab, install (click '+') the Sample application
and it will install it all in your workspace for you to play with & see how it works ;-)

Good luck

Rafi

Re: Sidenav

PostPosted: Thu Mar 30, 2023 4:31 pm
by eugenepenney
Many thanks Rafi. I will try it and give you feedback.
eugene.

Re: Sidenav

PostPosted: Thu Mar 30, 2023 4:41 pm
by rafig
You're welcome
And welcome to Servoy & the forum!
This is a great place to find answers & post your questions.
Enjoy

Re: Sidenav

PostPosted: Fri Mar 31, 2023 1:09 pm
by eugenepenney
Hi Rafi,
could not download the Sample Solution.

eugene.

Re: Sidenav

PostPosted: Fri Mar 31, 2023 1:31 pm
by rafig
Not sure what your issue might be...
Try installing a fresh copy and making sure that you let it install the default PostgreSQL database server and sample databases & data, then try to install it...

Re: Sidenav

PostPosted: Tue Apr 04, 2023 11:09 am
by eugenepenney
Hi,
just want to show a form by clicking a Sidenav menu.

thanks.
eugene.


Re: Sidenav

PostPosted: Tue Apr 04, 2023 3:48 pm
by hilgers
Hi Eugene,

you need to attach a method to onMenuItemSelected and there have some code which handles the menuItemId passed in.

A simple way could be like this
Code: Select all
function onMenuItemSelected(menuItemId, event) {
   if (menuItemId == "myID" ) {
      elements.sidenav.containedForm = forms.myform;
   }
}