i already did that… Eric…
[quote=34304:@Kem Tekinay]You create a standard, vertical scrollbar, then assign it to DOD in the DOD subclass Open event (it’s the only parameter to Open). DOD will manage the ScrollBar after that. In the ScrollBar’s ValueChanged event, you assign the DOD’s ScrollPosition.
This is in the example projects and elsewhere in the manual.[/quote]
ahhh i see what you mean… so don’t use the scrollbar on the DoD listbox but instead used the xojo vertical scrollbar
Are you talking about the StyleGrid or DataGrid??
Kem, I just adapt the your DoD on my application. it take half the time to load data then using the old way.
I saw u have a module for My_VIterator. What is this for??
That’s for the Valentina DB example.
Hi Kem,
i have some code in the double click on the native listbox. where do i put the same code in your DoD??
never mind… i must be blind… it is right there…
Hi Kem, another question. Is your listbox 0 based or 1 based??
0-based.
Kem,
When doing the following
vID=lstContact.Cell(lstContact.ListIndex, 0)
and got this
“You are attempting to access Cell of a DataRow that is not currently visible.”
it work on the native listbox.
Where can i store extra information i need in your DoD listbox??
You don’t. Store it elsewhere, like an array, linked to the same index. DOD is designed as a portal only and does not store anything.
ok… i found out i want to have hidden field i need to use lstContact.ListIndexDoD instead lstContact.ListIndex
3,000 lines ListBox is slow.
How many Columns ?
How Many characters ?
Are the Characters ASCII, UTF8, UTF16
Many other questions may be asked before we can understand why 3,000 Rows are slow.
FWIW: I used a SQLite db with nearly 3,000 Rows and it was not slow even in an old PC with Windows XP and its hard disk was never defragged.
defragged is important when you import text data in the data base, never was for ListBox operations.
7 Columns, (Three Columns only have 10 characters, three Columns store 1st Name, Last Name and Womens husband name )
not 3,000… it wasn’t that slow with that… i am talking about 30,000
So I miss read your original post: sorry.
is ok…
Kem, how do i set the first column to checkbox??
i manage to get it working with checkbox by adding some code to set it to checkbox type for column 1 in RequestRowData. The problem i have now is trying to click on one of the checkbox and move to next batch of the record, the checkbox that is ticked show up on the second batch too.
zRecSet.MoveToRecord( dataRow )
DIM cnt as integer, fldcnt as integer
fldcnt=zrecset.FieldCount-1
FOR cnt=0 to fldcnt
if cnt=0 then
me.CellType(dataRow, 0)=ListBox.TypeCheckBox
end if
me.Cell( dataRow, cnt ) = zRecSet.IdxField( cnt+1 ).StringValue
NEXT cnt
Kem, How do i accomplish selecting a few item on the checkbox on the first batch, go to the second batch, selecting a few more item and then finally create a string with all those selected record??
In the Open event, set the ColumnType to ListBox.TypeCheckbox. You don’t have to do it on each pass.
When setting the value of a checkbox column, set it’s CellCheck, not Cell.
I’m afraid I don’t understand this question.