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
620
UltraTilePanel scrolling during searching
posted

Hi,

i have a lot of tiles in my ultratilepanel, and use an ultracombobox to found the tile. The ultracombobox use the appendmode.

I want that everytime the combovalue change the ultratilepanel show the correct tile scrolling automatically at the tile position.

example: some countries in the world from A to Z, and my ultratilepanel show 4 tiles at time

start position:

albania

andorra

australia

austria

when i press I on my ultracombo, i must show in my ultratilepanel(for ex):
india

indonesia

irlanda

islanda

when i press T (after I) , i must show Italia etc

I dont understand how can set the scroll position for see the correct tiles after key press in the ultracombobox.

tks for help.

Parents
  • 34810
    Offline posted

    Hello Luca,

    I have been investigating into your requirement in this case, and I believe I have come up with a solution for it.

    In order to do this, the first thing I would recommend doing is to handle the UltraCombo’s TextChanged event. In this event, you can check the Text property of that control and get the first UltraTile from the UltraTilePanel’s Tiles collection that matches the text of the UltraCombo. In the case of the sample project I am attaching, the Caption of the UltraTile and the entries of the UltraCombo are the same.

    From here, I would recommend getting the wrapped TileContainerPanel that the UltraTilePanel has in its Controls collection at index 0 (assuming you haven’t added any new controls to this). This TileContainerPanel has a ScrollControlIntoView method that you can pass the UltraTile to in order to scroll it into view.

    The issue with this is that if the ScrollControlIntoView method is scrolling a tile that is “scrolled down”, it will put it on the bottom of the UltraTilePanel. As such, in the sample project I am attaching, I called a SuspendLayout() on the TileContainerPanel, followed by two ScrollControlIntoView calls. The first scrolls the last tile into view and the second scrolls the desired one. This ensures that you will be scrolling up as long as the desired tile is not at the bottom of the control, and it will bring the tile to the top row.

    I am attaching the sample I created to demonstrate the above.

    Please let me know if you have any other questions or concerns on this matter.

    TilePanelComboScroll.zip

Reply Children