Guest
Welcome login
Share/Save
Share/Save
TIBCOmmunity > Products > General Interface > GI 3.2 to 3.7 Development > Conversations
Home   Members Communities
Conversations () Resources () Blogs ()

GI 3.2 to 3.7 Development

Up to Conversations in GI 3.2 to 3.7 Development

This Question is Possibly Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)

How to limit drop down list size/direction

Created on: Feb 18, 2009 8:47 PM

Hi,

 

With regards to a Select/Combo (jsx3.gui.Select), is it possible to either limit the size (number or items visible before scrolling) or the drop down list position? When I have more then a certain number of values in the list the drop-down list actually drops "up" and is drawn above the combo/select box. My preference is for the list to always appear below the input box.

 

Is there some option I can specify so that it always tries to draw the drop-down box below the select control instead of above it? Alternatively is it at least possible to do something like specifying that you want it to try and draw n items below the input box before falling back to drawing the list above the input box?

 

At the moment the behaviour seems to be to draw the select list below the input box if the list is small enough (and would not need to be scrolled) otherwise draw the list above (even if it would need to be scrolled).

 

Rob

Click to view michael peachey's profile Dabbler 743 posts since
Oct 24, 2008
1. Feb 18, 2009 9:16 PM in response to: Rob J
Re: How to limit drop down list size/direction

Hi Rob -

 

Rereading your post, it seems clear that you've got a good handle on the current behavior, with just the additional adjustment that the intent is to show scrollbars with the control on top, only if it would display *more* of the control than showing the scrollbars on the bottom.

 

The intent is to anticipate whatver might happen in a dynamic liquid layout at runtime, and present the user with as much of the control as possible.But, I can certainly see your use case as well.

 

Are you working with the open source edition? If so, the mod for what you need would be pretty straightforward to pick out of the code. Let us know if you'd like a pointer.

 

peachey

Click to view michael peachey's profile Dabbler 743 posts since
Oct 24, 2008
4. Feb 18, 2009 9:24 PM in response to: Rob J
Re: How to limit drop down list size/direction

Yes, that would be cool.

 

Not a hard change, if you want to give it a shot we could think about rolling it into the supported product. Alternately, you could file an enhancement request in the Jira tracking system at gi.tibco.com, but it might not get much traction.

 

peachey

Click to view Jesse Costello-Good's profile Aficionado 836 posts since
Oct 24, 2008
5. Feb 19, 2009 11:49 AM in response to: Rob J
Re: How to limit drop down list size/direction

Hi Rob,

 

The easiest way to prevent the Select from opening above the control is to delete this line in Select.js:

 

objHW.addYRule(objGUI,"N","S",0);

 

All the logic in Heavyweight.js is geared towards filling the direction that affords the most space. I think adding more fine-grained rules to that class would be very difficult.

 

Another option that would work in Firefox is to edit the .jsx30select_optionlist class in the CSS files and add a max-height.

 

Jesse

Click to view Darren Hwang's profile Authority 1,397 posts since
Aug 6, 2008
6. Feb 19, 2009 7:19 PM in response to: Rob J
Re: How to limit drop down list size/direction

Hi Robert,

 

We appreciate your feedback and help. Let me know if you have trouble modifying Select.js code logic as Jesse said.

 

Anyway, doing your own build with GI is very simple.

 

You can download the source package (tibco-gi-3.7.0-src.zip) from http://gi.tibco.com

Assuming that you have Ant installed, simply go to the build/ directory. You will find the Ant build.xml file there. Simply type "ant" to start the build.

 

:D

Click to view Darren Hwang's profile Authority 1,397 posts since
Aug 6, 2008
7. Feb 19, 2009 7:57 PM in response to: Rob J
Re: How to limit drop down list size/direction

Please also submit an enhancement request on JIRA (http://gi.tibco.com/jira) With sufficient vote, we'll consider it for future release. ( have your friends vote for it. :)

Click to view Katie's profile Hotshot 290 posts since
Oct 24, 2008

I and the customers using my product would definitely appreciate this enhancement. I'm going to go search for a JIRA bug and vote for it!



More Like This

  • Retrieving data ...