sidenav questions

Forum to discuss the new web client version of Servoy.

sidenav questions

Postby jdbruijn » Tue Dec 20, 2016 4:28 pm

I've got a couple of questions about the sidenav webcomponent.

    In a recent webinar it was briefly mentioned that the sidenav component could be made fully responsive.
    Is there a sample to show how this is done?
    Also how do I change the width of the main form when the sidenav is hidden
    Is it possible to have multiple states when expanding?
    For example only the icon as the first state, icon and text as a second state and completely hidden?
Jos de Bruijn
Focus Feedback BV
Servoy Certified Developer
Image
jdbruijn
 
Posts: 492
Joined: Sun Apr 11, 2010 6:34 pm

Re: sidenav questions

Postby derk.hulshof » Wed Dec 21, 2016 9:21 am

Do you mean the pixel size of the screen with the multiple states ?

for example only icon when the width is < 768 px? hidden > 1024 px etc?

Can you explain what you want to accomplish here?
derk.hulshof
 
Posts: 108
Joined: Tue Dec 03, 2013 9:18 am
Location: Netherlands

Re: sidenav questions

Postby jdbruijn » Wed Dec 21, 2016 10:34 am

I am looking for something like in this sample:
http://bootsnipp.com/snippets/r80XP
Jos de Bruijn
Focus Feedback BV
Servoy Certified Developer
Image
jdbruijn
 
Posts: 492
Joined: Sun Apr 11, 2010 6:34 pm

Re: sidenav questions

Postby derk.hulshof » Wed Dec 21, 2016 2:04 pm

just put in 2 html divs 1 sidebar and 1 container.

where you play with de css media query. This css option captures your screen pixels (in example below)
Now you can set extra css classes in javascript and lets the css do the rest.
If you need more screen media query. Just add an extra media part in the css (example @media(min-width:768px) { /* css classes go here*/} )


maybe this small example get you started:
<div id="sidebar"></div>
<div id="container"></div>

#sidebar {
position: absolute;
top: 45px;
left: 0px;
bottom: 0px;
width: 180px;
}

#container {
position: absolute;
top: 45px;
left: 180px;
right: 0px;
bottom: 0px;
}

@media(min-width:1024px) {

#sidebar.expanded {
width: 180px;
}
#sidebar.collapsed {
width: 45px;
}

#container.expanded {
left: 180px;
}
#container.collapsed {
left: 45px;
}

}
derk.hulshof
 
Posts: 108
Joined: Tue Dec 03, 2013 9:18 am
Location: Netherlands

Re: sidenav questions

Postby jdbruijn » Wed Dec 21, 2016 2:11 pm

Hi Derk,

Thank you for your reply, but I am not sure how this relates to the sidenav component of servoy.
Do I need to edit the webcomponent files for this to work?
Jos de Bruijn
Focus Feedback BV
Servoy Certified Developer
Image
jdbruijn
 
Posts: 492
Joined: Sun Apr 11, 2010 6:34 pm

Re: sidenav questions

Postby derk.hulshof » Wed Dec 21, 2016 2:34 pm

Personally I did not work with the sidenav of Servoy yet myself.

But normally what you assume could be possible or just override the css classes

But that al depends on how you build your component
derk.hulshof
 
Posts: 108
Joined: Tue Dec 03, 2013 9:18 am
Location: Netherlands

Re: sidenav questions

Postby sbutler » Thu Dec 22, 2016 6:43 am

jdbruijn wrote:I am looking for something like in this sample:
http://bootsnipp.com/snippets/r80XP


Check out this. It may be what you want.
https://www.servoyforge.net/projects/se ... nents/wiki
Scott Butler
iTech Professionals, Inc.
SAN Partner

Servoy Consulting & Development
Servoy University- Training Videos
Servoy Components- Plugins, Beans, and Web Components
Servoy Guy- Tips & Resources
ServoyForge- Open Source Components
User avatar
sbutler
Servoy Expert
 
Posts: 759
Joined: Sun Jan 08, 2006 7:15 am
Location: Cincinnati, OH

Re: sidenav questions

Postby jdbruijn » Thu Dec 22, 2016 9:36 am

goldcougar wrote:Check out this. It may be what you want.
https://www.servoyforge.net/projects/se ... nents/wiki

Thanks for the tip Scott, I will check it out
Jos de Bruijn
Focus Feedback BV
Servoy Certified Developer
Image
jdbruijn
 
Posts: 492
Joined: Sun Apr 11, 2010 6:34 pm


Return to Servoy NGClient

Who is online

Users browsing this forum: No registered users and 8 guests