Hi, apologies if this has already been covered elsewhere, I did search but couldn’t find anything.
Is there a way to control the appearance of the TextField that appears when you click on an editable cell in a listbox? e.g. centre the text vertically so its inline with the rest of the row?
See attached pic, looks a bit rubbish on a Mac (not tried on other platforms).
This code takes care of variable Listbox.DefaultRowHeight > -1:
Me.EditCellAt(row, column)
Static dTextHeight As Double
If dTextHeight = 0 Then
Var p As New Picture(1, 1)
Var g As Graphics = p.Graphics
g.FontName = Me.FontName
g.FontSize = Me.FontSize
dTextHeight = g.TextHeight
End If
Me.ActiveTextControl.Height = dTextHeight
Me.ActiveTextControl.Top = Me.ActiveTextControl.Top + (Me.RowHeight / 2) - (Me.ActiveTextControl.Height / 2)
strangely, this workaround code does not do anything in my listbox. What could be the reason for that? Is there a minimum version of Xojo for this? (mine is 2019 r3,1)
I tried to find out more on API 2.0. I might blame myself here, but how do I install API 2.0? Somehow in the documentation it looks to me as this would be included in 2019r2?