` Printed Icetips Article

Icetips Article



Par2: Sizing a listbox
2008-01-28 -- Gustavo Pinsard
 
Is there a way to size a particular field in a listbox with the "whats left" 
room, like using -1 on a status bar.

I have several list boxes that i was a particular field (that is not the 
"last" field to take up what room is left on a resizeable window.
-----
What I do is to calculate the sum of all collumns tha I don't want to alter 
width, subtract it from the listbox width and apply the difference to the 
collumn I want to resize:

   w# = ?ListAgrupado{ PROPLIST:Width, 3 } + |
        ?ListAgrupado{ PROPLIST:Width, 5 } + |
        ?ListAgrupado{ PROPLIST:Width, 7 }

   ?ListAgrupado{ PROPLIST:Width, 1 } = ?ListAgrupado{ PROP:Width } - w#

In this case, I'm expanding the first column.  Notice that I skip every other 
column when summing.  That's because the queue that feeds the list has style 
columns.



Printed November 23, 2024, 2:11 am
This article has been viewed/printed 35222 times.