Hi,
I know I can get the number of colums via column count but I wonder:
from the documentation:
LB.Heading
Zero-based array of column headings
So if .Heading is a string array then why can’t I do
dim i as integer = LB.Heading.Ubound - 1
Hi,
I know I can get the number of colums via column count but I wonder:
from the documentation:
LB.Heading
Zero-based array of column headings
So if .Heading is a string array then why can’t I do
dim i as integer = LB.Heading.Ubound - 1
Bump
I would guess Xojo would have to implement the ubound function in their listbox for you to use it. What’s wrong with column count anyway?
[quote=130463:@Markus Winter]Hi,
I know I can get the number of colums via column count but I wonder:
from the documentation:
LB.Heading
Zero-based array of column headings
So if .Heading is a string array then why can’t I do
dim i as integer = LB.Heading.Ubound - 1[/quote]
Because heading takes a parameter - the heading index
As though its a pair of methods with signatures like
Function Heading(index as integer) as String
Sub Heading(index as integer, assigns newValue as string)
The docs in the header of http://documentation.xojo.com/index.php/ListBox.Heading make it sounds like it IS an array - but its an accessor method not an array
Check the examples which make that clear - lb.heading returns ONE heading at the specified index not the entire array
I’ve edited the page to make it clearer
Thanks for the explanation.
Still reads as “Zero-based array of column headings.” here.
Right it IS a zero based array but you access it via the heading METHOD which is why your original q doesn’t work.