Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1834
Sizing ListView Dropped Down from UltraComboEditor
posted

I feel like there's an obvious answer to this question, but I can't seem to find it.

In order to create a checked dropdown list in my UltraGrid, I have an UltraListView set to checkbox style which is loaded as the dropdown control of an UltraDropDownButton, which belongs to an UltraComboEditor that I am using for the cells in a grid column.  (So I really don't know where to post this, either...)

I know there's supposed to be a built-in way to do this from the 9.1 upgrade, which I have, but I don't see what it is.  Pointing that out to me would be nice. 

The problem I am having is that I can't see how to size the UltraListView to fit all its items.  I can't have the user scrolling down to check/uncheck items, they need to be able to click the dropdown button and see all of the list view.  What am I doing wrong?  Is there a way to size the listview to be big enough to fit all the items?  I don't see an ItemHeight or anything like that.  Do I have to do it manually?

Thanks,

Parents
No Data
Reply
  • 71886
    Offline posted

    Hello jammerms,

    What you could do as a possible approach to achieve your goal might be by calculating the height of the ultraListView control manually. In my code sample I am taking into account the height of the rectangle of the UIElement of the items and the number of items (+1 if you would like to not have scrollbar at all which shows because of the white space at the end of the items' list).

    Please take a look at the code I mentioned above:


    ultraListView1.Height = ultraListView1.Items[0].UIElement.Rect.Height * (ultraListView1.Items.Count + 1);


    Please do not hesitate to contact us if you need any additional assistance.

Children
No Data