Game Development Community

GuiTextListCtrl insert

by Howard Dortch · in Torque Game Engine · 03/23/2008 (7:15 am) · 2 replies

Can someone show me a way to insert a line in a text list control?
I tried the add but it adds at the end. These items have to stay in their positions just one line inserted and the rest moved down one. Any help ?

#1
06/15/2009 (12:00 pm)
I believe there is also an Index parameter that you can specify when doing addRow(%id,%txt,%index). I think you might be able to add such an index to specify a position in the list. There is also a sort option for the list.

But if you have, say, a list that is 5 rows in heigth and you want the entry to start at the bottom:

You want it to look like this:
<blank>
<blank>
<blank>
Entry

As opposed to:
Entry
<blank>
<blank>
<blank>

Not sure about that one. You may have to insert blank dummy entries or modify the source code of the control to render from the bottom up instead of from the top down.
#2
06/15/2009 (12:09 pm)
not sure if it's appropriate for your application,
but we often found that a GuiMLTextCtrl was easier to work with & more flexible than GuiTextListCtrl.