The SortListbox function is triggered in the HeaderPressed event handler of the WebListbox. As yesterday someone asked for how to color listbox background, I want to share the sample. If tempString "" And tempString str(tempString.val) And tempString.val 0 Then Me.ListIndex = 0 'highlight the first row TempString = ReplaceAll(tempString, " ", "") 'remove spaces TempString = ReplaceAll(tempString, ",", "") 'remove commas TempString = Uppercase(Me.Cell(tempInt, tempInt2)) This is one of many books at Xojo Library. If sortColumn = tempInt2 And numericalColumn Then Many screenshots have been added to show the results of the code with a full index to help find topics quickly. 'check If the chosen column is full of only numerical data Rec.Column("m圜olumn" + str(tempInt2)) = Me.Cell(tempInt, tempInt2) If fieldExistsInTable(memoryDB, "sortTable", "m圜ellTag" + Str(tempInt2)) Then rec.Column("m圜ellTag" + Str(tempInt2)) = Me.CellTag(tempInt, tempInt2) If fieldExistsInTable(memoryDB, "sortTable", "myRowTag") Then rec.Column("myRowTag") = Me.RowTag(tempInt) 'place the WebListBox data into the databaseįor tempInt As Integer = 0 to Me.RowCount - 1 rec = New DatabaseRecordįor tempInt2 As Integer = 0 to Me.ColumnCount - 1 If memoryDB.Error Then Return 'not sure why we got an error, but leave the table alone If you expand a folder, add the children for that expansion, and then collapse the row, the listbox’s LastIndex does not decrement to the collapsed row count. TempSQL = tempSQL + “extraSortColumnWAD DOUBLE” I just discovered the cause of an odd bug on many of my apps that I’m building under 18r1.1. TempSQL = tempSQL + "m圜ellTag" + Str(tempInt) + " TEXT COLLATE NOCASE, " If Me.CellTag(0, tempInt).StringValue "" Then TempSQL = tempSQL + “m圜olumn” + str(tempInt) + " TEXT COLLATE NOCASE, " //Ajouter le cellTag TempSQL = tempSQL + “myRowTag” + " TEXT COLLATE NOCASE, "įor tempInt As Integer = 0 to Me.ColumnCount - 1 32554 DocLangRef: WebPage Close event and method now go to links for the WebPage rather than the WebControl. If rsf.Field(“ColumnName”).StringValue = fieldName Thenįunction 2 : SortListbox(sortColumn As Integer) 33380 DocLangRef: WebListBox.ListIndex no longer indicates it is read-only. Some comments are in french but you should find your way around…įunction 1 : fieldExistsInTable (db As SQLiteDatabase, tableName As String, fieldName As String) As Boolean Hopefully it can be usefull for someone… So thanks again to David Cox for creating the main part of this code. It surely can be optimized and by the way, let me know if you do so :). I use two Functions in a subclassed WebListbox. It works well with Strings, dates and numbers. I modified David Cox 's function for sorting WebListBox ( Link to conversation) so it can take into account RowTags and CellTags as well.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |