I'm creating a dialog with a list box. What I'm stuck on is when adding a new list item to the list box. I want to it to always show the last added list item. Problem is when you add a list item that is below the bottom of the list box it just adds the item and displays the scroll bar. What I want is when the item is added to not only display the scroll bar but also automatically scroll down to the bottom of the list to show the last added list item.
Currently trying to figure this out on my own, but I thought I would ask on here.
There should be an action for highlighting a list box item, or it might be that the list box responds to "Set Dialog Item Value" properly, if so you would store the latest added item in a variable and go Set _Listbox_ Value to _Variable_
After you add that item what you have to do is, add list item "" to dialog item for all players select list item (number of items in dialog item) remove item (number of items in dialog item) if you do that you will always scroll down to the bottom.
I'm creating a dialog with a list box. What I'm stuck on is when adding a new list item to the list box. I want to it to always show the last added list item. Problem is when you add a list item that is below the bottom of the list box it just adds the item and displays the scroll bar. What I want is when the item is added to not only display the scroll bar but also automatically scroll down to the bottom of the list to show the last added list item. Currently trying to figure this out on my own, but I thought I would ask on here.
Any help would be great, thanks.
There should be an action for highlighting a list box item, or it might be that the list box responds to "Set Dialog Item Value" properly, if so you would store the latest added item in a variable and go Set _Listbox_ Value to _Variable_
@zorbotron: Go
If that doesn't work, you may have to continuously remove the top list items so that the scroll bar never appears.
After you add that item what you have to do is,
add list item "" to dialog item for all players
select list item (number of items in dialog item)
remove item (number of items in dialog item) if you do that you will always scroll down to the bottom.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
@willuwontu: Go
From what you said I got this:
Dialog - Add list item "" to List Dialog for (All players)
Dialog - Select item (Count of list items of List Dialog for 1) of List Dialog for (All players)
Dialog - Remove item (Count of list items of List Dialog for 1) from List Dialog for (All players)
Which does kinda scroll, but never all the way to the bottom.
if you look at what i did here this was the only fast and easy way i found to do it http://www.sc2mapster.com/maps/custom-chatbox-using-listbox/
i believe it uses timers but it works really well