[Gambas-user] I look for a dragging of GridView scrollbar more linear

Gianluigi bagonergi at gmail.com
Tue Nov 20 01:08:28 CET 2018


Il giorno lun 19 nov 2018 alle ore 10:48 Gianluigi <bagonergi at gmail.com> ha
scritto:

>
>
> Il giorno dom 18 nov 2018 alle ore 10:15 Gianluigi <bagonergi at gmail.com>
> ha scritto:
>
>> It's been more than four days that I try to make the dragging of GridView
>> scrollbar more linear, but I have not succeeded.
>> I try to explain what I would like to get:
>> I need to load millions of records into the grid and so far so good, I
>> load the grid with 50000 records step by step with SELECT LIMIT and with
>> the help of a vector.
>> If I scroll the grid with the mouse wheel or with the arrow keys on the
>> scrollbar, everything good working.
>> Unfortunately, the scroll bar slider every time I reload the 50000 new
>> records jumps up preventing proper dragging with the mouse.
>> I tried to form the complete grid, but I can not load it with the step by
>> step (I always get 'out of bound' error).
>>
>> I enclose a demonstration project that, when opening it,  create  a
>> SQLite database in User.Home &/ Application.Name and loads a table (user)
>> with 600000 records, you need to be patient when you first open it.
>> Any help is appreciated
>>
>> Regards
>> Gianluigi
>>
>
> I have an idea, it is likely that _Data event uses "LIMIT" within it.
> In this case the problem is the vector.
> Now I am engaged in another job but as soon as I have time I will verify.
>
> Regards
> Gianluigi
>

In fact the GridView Data event does all the work and it is not necessary
to split the records with LIMIT.
I published an example on the Farm (DBSpeedyTest).
I read on the wiki [0] this:
GridView1.Data.text = Str($res[GridView1.Columns[column].text])
which I think is wrong, if you agree I would change it with:
GridView1.Data.Text = $res[Str(Column)]
I would like a reply.
Regards
Gianluigi

[0] http://gambaswiki.org/wiki/howto/databasesqlite
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20181120/d0198cb1/attachment.html>


More information about the User mailing list