![]() ![]() This lets the selection go in and out, I mean if there’s no selection one will come in and if you key in a direction where no rows are available then the selection is removed. The ListIndex isn’t reapplied until what it’s going to be is figured out. Then it just loops in that direction until a match is found or it reaches the end. The direction is used to find the row to begin searching at. Whether you’re going up or down the logic of finding a row is the same. If Me.RowIsFolder(idx) And Me.ListIndex = Max Then ListIndex = -1 If all Folders are closed, Listindex should be -1! Please look, but it’s buggy, try it please. OK, with Gregs Help i got it working jumping from one to another Row with more then one Folder between the Rows. G.DrawString(Cell(row, column), 0, g.Height - (g.TextHeight/2)) Return Trueįunction KeyDown(Key As String) As Boolean If RowTag(row) = RowType.Section And x > 14 Then Return True // 14 Pixels for the Triangularįunction CellTextPaint(g As Graphics, row As Integer, column As Integer, x as Integer, y as Integer) As Boolean G.DrawLine 0, g.Height-1, g.Width, g.Height-1įunction CellClick(row as Integer, column as Integer, x as Integer, y as Integer) As Boolean Me.AddItem Array("I.", "Clara Mustermann")Įvent CellClick(row As Integer, column As Integer, x As Integer, y As Integer) As Booleanįunction CellBackgroundPaint(g As Graphics, row As Integer, column As Integer) As Boolean Me.AddItem Array("Mom", "Maria Mustermann") Me.AddItem Array("Dad", "Max Mustermann") If Me.RowIsFolder(row) Then Select Case Me.Cell(row, 0) I know, it will be maybe a mathematical Thing?! Any Ideas? Below my Source ![]() Item (a) // when use Keydown, Section 4 will be selected and not Item b (that’s what i want).It works fine, if the structure isīut if i’ll have 2 or more closed Sections, it doesn’t work. Sections shouldn’t be select- and clickable (Keydown-Event). I created a hierarchical Custom Listbox with Sections. ![]()
0 Comments
Leave a Reply. |