on 09-21-2008 7:02 AM
Hi All,
I have item list box where elements get added or removed by the end user by click of a button
It works fine but the problem is the width of item list box chages depending on the option selected by user.
If user selects an option with many characters and adds to list box then the width increases and if it is deleted then then the width comes back to original size.
I tried fixing the width of the list box but still not able to solve the issue.
Is there any way of fixing the width of the list box so that it wont change depend on the element that is getting added or removed.
Thanks and Regards,
Pradeep
Pradeep,
I tried setting the width of 'ItemListBox' to 50px and it works fine for me. Similarly, DropDownByIndex and DropDownByKey also obey property 'width' diligently. NWDS and EP version may play a part here. I'm on NWDS CE 7.1 SR5.
Drawback of setting the width is that if your users add a text wider than your set limit, it may not be visible properly. One way of dealing with this issue is to add a text yourself that takes into consideration maximum possible width of texts that users can add.
Hope this helps.
Vishwas.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pradeep,
Set the layout property of the container of the item list box (in which container your list box was embedded)
layout GridLayout
Then set the width of the Item list box.
width MAXSIZEpx
If it doesn't work try with
LayoutData
width property( The last property in property view)
Regards,
Siva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Siva/Viswas,
Problem got solved.I fixed width in pixels and the width does not change.
But as Viswas said,if the text is long then the user will not be able to see entire text..How to solve this problem other than showing a different text to user(As the user does not want that way).
I tried by dynamically creating a tool tip i.e, i bound the tool tip of list box to a attribute and i was setting the attribute to the selected text in list box.But unfortunately tool tip does not show up.Do you guys worked on dynamically generating a tool tip or else can you tell how to solve this problem.
Thanks and Regards,
Pradeep
Pradeep,
It looks like you are using DropDownByIndex , please try change this to DropDownByKey.
Thanks
Krishna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.