You would then be able to use that function on any Listbox. Using the Xojo Language Object-Oriented Programming Example projects Debugging TOPICS. Sender.Cell(rowIndex, column) = sender.Cell(rowIndex, column) + value Var lbRow As String Var space As String For column As Integer 0 To Data.LastColumnIndex lbRow lbRow + space + Data.CellTextAt(IteratorRow, column). If sender.ListCount > 0 and column > -1 and sender.ColumnCount > column thenįor rowIndex As integer = 0 to sender.ListCount - 1 In the case of a ListBox, this code gets the String value for each column in the row, separates it by spaces, and returns it as a single String value. Sub AppendToColumn(Extends sender As Listbox, value As String, column As Integer) ![]() RectControl).įor that, you can create Global methods in a Module that have their first parameter as the type of class you want to extend and prefixed with the " Extends" keyword. However, sometimes you want to make available functionality to all your different Listboxes and their sub-classes, or even all types of controls or parent classes for the classes you can use (e.g. A fast and flexible list viewer that is an easy to use drop-in replacement for Xojo’s Listbox control, providing more capabilities and a more native feel. The answer by Thomas is the usual way of extending the functionality of a built in class, sub-classing is usually what you want to do.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |