ListBox: First Column Freeze From Scrolling

Once upon a time there was a great plugin called StyleGrid which added a feature to freeze the first column from being scrolled, so while a user is scrolling the grid to the right the data in the first column (or more) would stay visible for reference. Years and years later I’m wanting to move to the latest Xojo and can’t seem to find something similar. Is there any way to achieve this using the listbox?

Since StyleGrid is no more this makes updating previous works with this functionality impossible. Is there a way or any chance this will ever be an option for the listbox?

Thanks

[quote=463534:@James Holy]Once upon a time there was a great plugin called StyleGrid which added a feature to freeze the first column from being scrolled, so while a user is scrolling the grid to the right the data in the first column (or more) would stay visible for reference. Years and years later I’m wanting to move to the latest Xojo and can’t seem to find something similar. Is there any way to achieve this using the listbox?

Since StyleGrid is no more this makes updating previous works with this functionality impossible. Is there a way or any chance this will ever be an option for the listbox?

Thanks[/quote]

Some people use two linked listboxes to do that.

  • karen

I suppose that will work, as clunky as it is, just need to have them scroll up/down together. Thanks for the feedback.

It would be relatively easy to fake it in a single listbox IF all the columns are the same size and not resizable.

if they are not the same size,I suspect adjusting column widths on the fly for horizontal scrolling would have visual issues because it would happen too slowly.

Thinking about it, another possible solution would be to use a canvas (or put the listbox in a container control and use its background) and draw the first column contents yourself, setting the width of the actual first column of the listbox to 0… A good bit of work to get it right in every situation, but could be possible.

-Karen

I will experiment a bit and see how it goes! Much appreciated.

[quote=463540:@Karen Atkocius]Some people use two linked listboxes to do that.

  • karen[/quote]
    I use at least 3
    1 for locked columns, one for locked rows, one for the scrollable bits
    but its all set up in a container so it behaves as if its a single listbox

I replaced all my StyleGrid instances with piDog’s DataView control. It not only does locked columns or rows, but way too many other things to mention here. I highly recommend checking it out, but for MUCH more than just its locked columns capabilities.