[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Always show vertical scrollbar in grid?  XML
Forum Index -> Development
Author Message
bthalheim

Power User

Joined: 05/04/2012 11:45:24
Messages: 72
Offline

Hi,

usually, a scrollbar on the right side of a grid is only visible if it is necessary. Is there a possibility to also show it also when it's not necessary.

The reason why I am asking this is because we have a column layout where the leftmost column is of width="100%" which means that when the scrollbar dissappears, all other columns are being pushed to the left by the width of the scrollbar. To prevent this, it would be cool to be able to say that the scrollbar shall always be displayed.

Thanks,

Björn
dstrigel

Power User

Joined: 09/12/2010 09:23:42
Messages: 69
Offline

try this:
SCROLLPANENode scrollpaneNode = new SCROLLPANENode();
scrollpaneNode.setVerticalscrollmode( "always");

Kind regards,
Daniel
bthalheim

Power User

Joined: 05/04/2012 11:45:24
Messages: 72
Offline

Hi,

thanks for your answer. Of course, verticalscrollmode should do the job.

Should ... but doesn't, if you use "always". Please have a look at the attached UI class. There I try to use this attribute. Using "always" does not have the expected effect. Using "hidden" (I've tried that) works as expected.

Do I expect something wrong of verticalscrollmode=always or have I found a bug ;-)?

Thanks,

Björn
 Filename dynamicGridDemo.jsp [Disk] Download
 Description Dynamic Grid Demo JSP as in CC Demo Application.
 Filesize 800 bytes
 Downloaded:  395 time(s)

 Filename DemoGridDyn.java [Disk] Download
 Description Dynamic Grid Demo as in CC Demo Application, but with ComponentNodes instead of XML.
 Filesize 5 Kbytes
 Downloaded:  438 time(s)

CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5538
Offline

...seems that there are problems with "always" in the FIXGRID component. We check...

Regards, Björn

PS: btw: in the class DemoGridDyn there is one line...

Code:
 fixgridComponentNode.addAttribute("sbvisibleAmount", "25");
 


...which is not 100% correct: write "sbvisibleamound" (insteadof "sbvisibleAmound"). Or, even better: use FIXGRIDComponent and directly access setSbvisibleamotun(..)...

Björn Müller, CaptainCasa GmbH
bthalheim

Power User

Joined: 05/04/2012 11:45:24
Messages: 72
Offline

We check...  


Thanks for checking!

Or, even better: use FIXGRIDComponent and directly access setSbvisibleamotun(..)... 


How exactly do you mean?

I'd like to rephrase my code from:
Code:
 	private ComponentNode createFixgridComponentNode() {
 		ComponentNode fixgridComponentNode = new ComponentNode("t:fixgrid");
 		fixgridComponentNode.addAttribute("objectbinding", "#{d.DemoGridDyn.rows}");
 		fixgridComponentNode.addAttribute("width", "100%");
 		fixgridComponentNode.addAttribute("height", "100%");
 		fixgridComponentNode.addAttribute("sbvisibleAmount", "25");
 		fixgridComponentNode.addAttribute("verticalscrollmode", "always");
 		return fixgridComponentNode;
 	}
 


to
Code:
 	private ComponentNode createFixgridComponentNode() {
 		FIXGRIDComponent fixgridComponentNode = new FIXGRIDComponent();
 		fixgridComponentNode.setObjectbinding("#{d.DemoGridDyn.rows}");
 		fixgridComponentNode.setWidth("100%");
 		fixgridComponentNode.setHeight("100%");
 		fixgridComponentNode.setSbvisibleamount("25");
 		fixgridComponentNode.setVerticalscrollmode("always");
 		return fixgridComponentNode;
 	}
 


Unfortunately, this does not work, since FIXGRIDComponent doesn't have these setters. How would you rephrase this piece of code?

Thanks,

Björn
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5538
Offline

Hi,

please use FIXGRIDNode, not FIXGRIDComponent - then the setters will show up.

Regards, Björn

Björn Müller, CaptainCasa GmbH
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5538
Offline

---"always" problem is fixed. Fix is part of next update (Monday).

Thanks for your message +
Regards!
Björn

Björn Müller, CaptainCasa GmbH
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team