Icon View Thread

The following is the text of the current message along with any replies.
Messages 11 to 20 of 34 total
Thread Filtering in the grid
Mon, Mar 19 2018 7:58 AMPermanent Link

Mark Brooks

Slikware

Avatar

Create own display mechanism, probably based on panels, with virtualisation
Mon, Mar 19 2018 9:35 AMPermanent Link

Matthew Jones

Mark Brooks wrote:

> Create own display mechanism, probably based on panels, with virtualisation

You know, that would work very well...

--

Matthew Jones
Mon, Mar 19 2018 10:21 AMPermanent Link

Mark Brooks

Slikware

Avatar

"Matthew Jones" wrote:

>> You know, that would work very well...

And fun! Potentially ...........
Mon, Mar 19 2018 10:29 AMPermanent Link

Uli Becker

Hi Mark,

> Create own display mechanism, probably based on panels, with virtualisation

I'm using this approach quite often, but not with a big number of records. So I've never needed virtualisation (and wouldn't even know how to realize it).
Could you elaborate how to do that?

Thanks Uli
Mon, Mar 19 2018 11:33 AMPermanent Link

Matthew Jones

Uli Becker wrote:

>  virtualisation (and wouldn't even know how to realize it).

It is actually simple. You separate the display from the storage. So, let's say you have 20 panels with some text and a checkbox on. This is easy if you define a form, and then have them layout to top left, so they sort themselves out visually. Create them at run-time and keep a list pointing to each one.

Now you have you list of 100 items, and you tell the forms which of the items to display. They update the label and checkbox according to the item passed in. As you scroll, you just tell them to show other items further down the list.

The key benefit here is that the forms, labels, checkboxes are expensive to create but not to update. So the cost is all up front, and the update happens in a blink.

--

Matthew Jones
Mon, Mar 19 2018 12:29 PMPermanent Link

Uli Becker

Matthew,

thanks. Yes,  the principle is clear. The question is how to realize it in detail, especially scrolling.

Uli
Mon, Mar 19 2018 12:34 PMPermanent Link

Matthew Jones

Uli Becker wrote:

> thanks. Yes,  the principle is clear. The question is how to realize it in detail, especially scrolling.

It depends on how fancy you want to be. I originally just used a simple scroll bar, but then I got into a custom version of TListBox which handles any form you want as child.

https://www.elevatesoft.com/forums?action=view&category=ewb&id=ewb_components&page=1&msg=69#69 has the details, and I have used it quite a lot, with a bit more customisation and fixing for specific uses. I'm not really happy with it but it works - it is complicated in that my code has to be able to hide some forms and keep them around for re-use. But it is a good starter.

--

Matthew Jones
Mon, Mar 19 2018 1:54 PMPermanent Link

Mark Brooks

Slikware

Avatar

I've also done this by having a set number of panels, specifically sufficient to fill the display only, then paging, but client side. So:

- Load data into an efficient in-memory construct client-side
- Fill display with X panels
- Load first X items into these panels
- Subsequent page-down / page-up commands will reload X new items into the X panels

This is VERY fast even with thousands of items since the display element (by far the slowest) only ever worries about X items. But, it is paging, which can be a bit "uncool".

So another way is to start per the above mechanism but then, on a scroll down (or clicking "show more") add another X panels and load X items into them. This way the panel count grows as the user scrolls down, not all at once at the start. Lots of social sites use this method. However, it's not great if you want to "go to end".
Tue, Mar 20 2018 6:24 AMPermanent Link

Uli Becker

Mark,

> - Load data into an efficient in-memory construct client-side
> - Fill display with X panels
> - Load first X items into these panels
> - Subsequent page-down / page-up commands will reload X new items into the X panels

No problem to realize that - but "smooth" scrolling: that's what I mean.
1. You would need a scrollbar and syncronize it with the panels.
2. How to "scroll" the panels?

I am going to have a look at TGrid - this is virtual and it works fine.

Thanks Uli
Tue, Mar 20 2018 6:26 AMPermanent Link

Uli Becker

Matthew,
 
> https://www.elevatesoft.com/forums?action=view&category=ewb&id=ewb_components&page=1&msg=69#69 has the details, and I have used it quite a lot, with a bit more customisation and fixing for specific uses. I'm not really happy with it but it works - it is complicated in that my code has to be able to hide some forms and keep them around for re-use. But it is a good starter.

Thanks. I'm going to have a look - unfortunately the links either to the demo and the sources are down.

Uli
« Previous PagePage 2 of 4Next Page »
Jump to Page:  1 2 3 4
Image