Xojo Conferences
XDCMay2019MiamiUSA

Scrolling horizontally in a ListBox, fixing first two columns, scrolling rest (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: [ANN] Log analyzer TrendyMac 0.9.14 ava =lable - Feedback welcome?
Next thread: RB 2005 R2 BSOD!


Win32 API Declares   -   Berg, Heath
  Scrolling horizontally in a ListBox, fixing first two columns, scrolling rest   -   smm33 buffalo.edu
   Re: Scrolling horizontally in a ListBox, fixing first two columns, scrolling rest   -   Joe Huber
   Re: Scrolling horizontally in a ListBox, fixing first two columns, scrolling rest   -   Paul Rehill
   Re: Scrolling horizontally in a ListBox, fixing first two columns, scrolling rest   -   Ron Benditt
   Re: Scrolling horizontally in a ListBox, fixing first two columns, scrolling rest   -   Will Leshner
    Re: Scrolling horizontally in a ListBox, fixing first two columns, scrolling rest   -   keatk comcast.net
   Re: Scrolling horizontally in a ListBox, fixing first two columns, scrolling rest   -   Ron Benditt
    Re: Scrolling horizontally in a ListBox, fixing first two columns, scrolling rest   -   keatk comcast.net
   Re: Scrolling horizontally in a ListBox, fixing first two columns, scrolling rest   -   Ron Benditt
    Re: Scrolling horizontally in a ListBox, fixing first two columns, scrolling rest   -   keatk comcast.net
    Re: Scrolling horizontally in a ListBox, fixing first two columns, scrolling rest   -   Ricardo Rojas

Scrolling horizontally in a ListBox, fixing first two columns, scrolling rest
Date: 02.08.05 15:29 (Tue, 02 Aug 2005 10:29:39 -0400)
From: smm33 buffalo.edu
Hello all,

I have a multi-columned listbox and when I scroll horizontally, I would like the first two
columns to remain fixed while the rest of the columns scroll. How do I accomplish this?

-Steve

smm thirty-three at buffalo dot edu
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Scrolling horizontally in a ListBox, fixing first two columns, scrolling rest
Date: 03.08.05 01:56 (Tue, 2 Aug 2005 17:56:38 -0700)
From: Joe Huber
At 10:29 AM -0400 8/2/05, <email address removed> wrote:
>I have a multi-columned listbox and when I scroll horizontally, I
>would like the first two columns to remain fixed while the rest of
>the columns scroll. How do I accomplish this?

One thought is to not actually scroll the columns, but to hide one or
more unneeded columns using the ColumnWidth property. You could use
your own horizontal scroll bar or some other UI element to "scroll"
the set of columns.

If you have columns A, B, C, D, and E. Then you could scroll by
setting Column C's width to 0. Scroll more by setting column D's
width to 0, etc.

This is not quite the same as scrolling but might actually be a
better UI since you'd never have a partial column in the middle of
your listbox.

Hope this helps,
Joe Huber
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Scrolling horizontally in a ListBox, fixing first two columns, scrolling rest
Date: 03.08.05 08:19 (Wed, 3 Aug 2005 17:19:19 +1000)
From: Paul Rehill
Steve

Joe has the answer. Use a listbox and a separate scrollbar. In the
scrollbar's change event you can resize the list box column widths
using the value of the scrollbar to determine how many columns after
the first two will have a zero column width, how many columns have a
positive column width, with any columns that can't be viewed on screen
(without scrolling further to the right) also having a zero column
width. Use a loop to achieve this to come up with a listbox columns
string width like "100,50,0,0,0,30,30,30...,30,0,0,0"
This shows the first two columns, hides the next three and the last three.

When the listbox opens, you need to set the default column width.

I have used a variation of this to always show the first and last
columns and scroll to view 11 of up to 23 columns in between. A
column width string like "100, 0,..., 0, 30, ... , 30, 0, ..., 0, 40"
achieves this.

Regards

Paul Rehill
mathsteacher.com.au
RB 5.5.5 Mac Pro, Mac OS 10.3.6
RB 5.5.5 Win Standard, Win XP SP2

On 8/3/05, Joe Huber <<email address removed>> wrote:
> At 10:29 AM -0400 8/2/05, <email address removed> wrote:
> >I have a multi-columned listbox and when I scroll horizontally, I
> >would like the first two columns to remain fixed while the rest of
> >the columns scroll. How do I accomplish this?
>
> One thought is to not actually scroll the columns, but to hide one or
> more unneeded columns using the ColumnWidth property. You could use
> your own horizontal scroll bar or some other UI element to "scroll"
> the set of columns.
>
> If you have columns A, B, C, D, and E. Then you could scroll by
> setting Column C's width to 0. Scroll more by setting column D's
> width to 0, etc.
>
> This is not quite the same as scrolling but might actually be a
> better UI since you'd never have a partial column in the middle of
> your listbox.
>
> Hope this helps,
> Joe Huber
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Scrolling horizontally in a ListBox, fixing first two columns, scrolling rest
Date: 02.08.05 23:36 (Tue, 2 Aug 2005 18:36:08 -0400)
From: Ron Benditt
> I have a multi-columned listbox and when I scroll horizontally, I
> would like the first two
> columns to remain fixed while the rest of the columns scroll. How
> do I accomplish this?
>
> -Steve

Steve,

I don't think that this can be done with the existing listbox. You
may need to create your own (yikes!) or use a plug in to get this to
work. The only one that I know of is this one:

http://www.redlien.com/realbasic/columnmover/

Its a Mac only solution, though, and I've never used it so I can't
really vouch for it, but Corey Redlien makes some nice looking software.

If anyone knows of another way to do this, please post it. I have an
upcoming use for such a feature, but it needs to be for OS X and Win32.

Thanks,

Ron Benditt
Alien Apparatus Company, Inc.
http://www.alienapparatus.com

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Scrolling horizontally in a ListBox, fixing first two columns, scrolling rest
Date: 02.08.05 23:47 (Tue, 2 Aug 2005 15:47:14 -0700)
From: Will Leshner

On Aug 2, 2005, at 3:36 PM, Ron Benditt wrote:

> I don't think that this can be done with the existing listbox. You
> may need to create your own (yikes!) or use a plug in to get this
> to work. The only one that I know of is this one:

I'm thinking a plugin isn't going to help out here. But one quick-and-
dirty idea is to use two listboxes.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Scrolling horizontally in a ListBox, fixing first two columns, scrolling rest
Date: 03.08.05 00:14 (Tue, 02 Aug 2005 23:14:39 +0000)
From: keatk comcast.net
> I'm thinking a plugin isn't going to help out here. But one quick-and-
> dirty idea is to use two listboxes.

I've gotten that to work for an in-house app and it's usuable ...but there are some cosmetic issues with trying to syncronize scrolling and selections that I coudl not overcome and that would not be acceptable if one was selling the app IMO.

- karen
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Scrolling horizontally in a ListBox, fixing first two columns, scrolling rest
Date: 03.08.05 00:44 (Tue, 2 Aug 2005 19:44:17 -0400)
From: Ron Benditt
> I'm thinking a plugin isn't going to help out here. But one quick-and-
> dirty idea is to use two listboxes.

Yes, I agree. I'm actually in the middle of throwing together a
"proof-of-concept" that illustrates this using two listboxes right
next to each other, with two scroll bars as separate controls. It
works pretty good so far.

Ron Benditt
Alien Apparatus Company, Inc.
http://www.alienapparatus.com


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Scrolling horizontally in a ListBox, fixing first two columns, scrolling rest
Date: 03.08.05 00:58 (Tue, 02 Aug 2005 23:58:55 +0000)
From: keatk comcast.net
> Yes, I agree. I'm actually in the middle of throwing together a
> "proof-of-concept" that illustrates this using two listboxes right
> next to each other, with two scroll bars as separate controls. It
> works pretty good so far.

My recollection was wrong... i just looked at my app that i have setup like that. Horizaontal and vertical vertical scrolling work ok. The problem is in selecting a row. I wanted them to act as one listbox... but there is a noticable lag from when one clicks on a row in one listbox and it becomes selected and when the selection moves in the second listbox..

Also IIRC on the Mac the higlight color chnages on the lisbox that does not have the focus. Hopefully that could be solved by drawing the background yourself so it does not have a deselected look. I did not bother trying as we now use PC's at work.
BTW geting them to sort togther was a liitle tricky IIRC as well.
- karen
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Scrolling horizontally in a ListBox, fixing first two columns, scrolling rest
Date: 03.08.05 03:30 (Tue, 2 Aug 2005 22:30:14 -0400)
From: Ron Benditt
> My recollection was wrong... i just looked at my app that i have
> setup like that. Horizaontal and vertical vertical scrolling work
> ok. The problem is in selecting a row. I wanted them to act as one
> listbox... but there is a noticable lag from when one clicks on a
> row in one listbox and it becomes selected and when the selection
> moves in the second listbox..
>
> Also IIRC on the Mac the higlight color chnages on the lisbox that
> does not have the focus. Hopefully that could be solved by drawing
> the background yourself so it does not have a deselected look. I
> did not bother trying as we now use PC's at work.

Ooooohhh.... Good point. You're right; its not trivial to get the
row selection working. The paint event can be made to fix the color
problem that you mentioned, but to deal with the lag, the paint event
in one listbox must also paint the background in the other, and vice
versa for this to look decent. There's a lot of little subtleties
here. If the user hits the page-up or page-down, they need to be
synched as well by catching the key-down events. Ugh! Not as easy
as it appears!

Ron Benditt
Alien Apparatus Company, Inc.
http://www.alienapparatus.com
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Scrolling horizontally in a ListBox, fixing first two columns, scrolling rest
Date: 03.08.05 03:45 (Wed, 03 Aug 2005 02:45:03 +0000)
From: keatk comcast.net
Another problem is by using external scrollbars is that auto scrolllwheel support ONLY works when the mouse is over scrollbar and not over the listbox itelf...

LOTs of subtilities if you want a solid somewhat sophisticated UI... like much else with RB UI stuff it's easy to get 80% of the way there ... but the last 20% iis often a killer - and too often there is no good solution when trying to use the famework creatively... which is why for many situations situations the RB listbox can be frustrating

I this case i decided I and my users (who report to me ;-) ) could live with the cosmetic issues and other shortcomming ... the only other alternative was to use a canvas and and habdle everything myself starting from scratch.... but for a commercial app the shortcomming of this approach for a 2 pane list UI (which every spreadsheet user is familar with) would have necessitated that IMO.

- Karen
-------------- Original message --------------

> > My recollection was wrong... i just looked at my app that i have
> > setup like that. Horizaontal and vertical vertical scrolling work
> > ok. The problem is in selecting a row. I wanted them to act as one
> > listbox... but there is a noticable lag from when one clicks on a
> > row in one listbox and it becomes selected and when the selection
> > moves in the second listbox..
> >
> > Also IIRC on the Mac the higlight color chnages on the lisbox that
> > does not have the focus. Hopefully that could be solved by drawing
> > the background yourself so it does not have a deselected look. I
> > did not bother trying as we now use PC's at work.
>
> Ooooohhh.... Good point. You're right; its not trivial to get the
> row selection working. The paint event can be made to fix the color
> problem that you mentioned, but to deal with the lag, the paint event
> in one listbox must also paint the background in the other, and vice
> versa for this to look decent. There's a lot of little subtleties
> here. If the user hits the page-up or page-down, they need to be
> synched as well by catching the key-down events. Ugh! Not as easy
> as it appears!
>
> Ron Benditt
> Alien Apparatus Company, Inc.
> http://www.alienapparatus.com
> _______________________________________________
> Unsubscribe or switch delivery mode:
>
> Search the archives of this list here:
>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Scrolling horizontally in a ListBox, fixing first two columns, scrolling rest
Date: 03.08.05 16:05 (Wed, 3 Aug 2005 11:05:52 -0400)
From: Ricardo Rojas
<email address removed>, wrote:
>>I have a multi-columned listbox and when I scroll horizontally, I
>>would like the first two columns to remain fixed while the rest of
>>the columns scroll. How do I accomplish this?

Joe Huber, <email address removed>, wrote:
>One thought is to not actually scroll the columns, but to hide one or
>more unneeded columns using the ColumnWidth property. You could use
>your own horizontal scroll bar or some other UI element to "scroll"
>the set of columns.
>
>If you have columns A, B, C, D, and E. Then you could scroll by
>setting Column C's width to 0. Scroll more by setting column D's
>width to 0, etc.
>
>This is not quite the same as scrolling but might actually be a
>better UI since you'd never have a partial column in the middle of
>your listbox.

Very clever! Joe. Even thought I have no need of this UI at present,
thanks to your idea, I feel like trying it out myself.

Thanks for sharing,
>>>®<<
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>