A couple of bad help screens

While using the online Help a little while ago, my brain started lagging my fingers and would up searching for ‘ColumnFrom’ rather than ‘ColumnFromXY’. The help screen showed the options Listbox.ColumnFromXY and Listbox.ColumnFromPoint. So, out of curiosity, I looked at ColumnFromPoint and it looks like a clone of ColumnFromXY…except that <ListBox>.ColumnFromPoint won’t compile. Nor does its counterpoint <ListBox>.RowFromPoint.

I filed a bug report recommending the pages be removed.
<https://xojo.com/issue/59238>

As an addendum, I encountered the documentation issue while trying to figure out a way to get ColumnFromXY to return a valid column number when the cursor was in the Listbox’s header. Doesn’t work (although I did find code somewhere in this forum that will do it IFF there are valid data work in the listbox. So close!)

Anyway, the ColumnFromXY issue already has an old, old bug report. <https://xojo.com/issue/10277>

Good find, looks like it was forgotten about in the rename.

Is this of any use to you? Try it in Listbox.MouseMove

Dim borderSize As Integer = 1 'Should really use a cached GetSystemMetrics(SM_CXBORDER) here Dim mouseOverHeader As Boolean = If(Me.HasHeading, If((y >= borderSize) And (y <= (Me.HeaderHeight - borderSize)), True, False), False) Dim col As Integer = Me.ColumnFromXY(x, If(mouseOverHeader, Me.HeaderHeight, y)) system.DebugLog("mouseOverHeader=" + str(mouseOverHeader) + " col=" + str(col))

[quote=476006:@JulianS]Good find, looks like it was forgotten about in the rename.

Is this of any use to you? Try it in Listbox.MouseMove

Dim borderSize As Integer = 1 'Should really use a cached GetSystemMetrics(SM_CXBORDER) here Dim mouseOverHeader As Boolean = If(Me.HasHeading, If((y >= borderSize) And (y <= (Me.HeaderHeight - borderSize)), True, False), False) Dim col As Integer = Me.ColumnFromXY(x, If(mouseOverHeader, Me.HeaderHeight, y)) system.DebugLog("mouseOverHeader=" + str(mouseOverHeader) + " col=" + str(col))[/quote]
Yeah, thanks. I picked that up from where you posted it elsewhere in the forums. It does have one problem. As I mentioned, it doesn’t return the column if there are no data rows in the listbox.