Board index » delphi » Hiding the scrollbar of a TListBox among else...

Hiding the scrollbar of a TListBox among else...

Hello,

I've got two TListBoxes next to eachother. One of them is enabled while
the other is disabled. I'd like the disabled listbox to scroll when the
user scrolls the enabled listbox. Is this possible? There isn't an
OnScroll event for the TListBox...

I don't want the disabled listbox to display a scrollbar.

Can anyone help me?

I'm using Delphi 1.02.

Thanks in advance...
____________________________________________

           -=|David Polberger|=-
____________________________________________

.oO staffan.polber...@mailbox.swipnet.se Oo.
.oO      http://mmplayer.home.ml.org     Oo.

 

Re:Hiding the scrollbar of a TListBox among else...


Quote
David Polberger wrote:

> Hello,

> I've got two TListBoxes next to eachother. One of them is enabled while
> the other is disabled. I'd like the disabled listbox to scroll when the
> user scrolls the enabled listbox. Is this possible? There isn't an
> OnScroll event for the TListBox...

> I don't want the disabled listbox to display a scrollbar.

> Can anyone help me?

> I'm using Delphi 1.02.

> Thanks in advance...

This sounds like an identical thing I tried once.  To hide the scrollbar
derive a new component as follows.

TMyListbox=class(TListBox)
private
 procedure CreateParams(var p:TCreateParams);override;
end

.......

procedure TMyLIstBox.CreateParams(p);
begin
 inherited createparams(p);
 p.style:=P.Style and (Not ws_HScroll);
end;

In the end I gave up on the side by side listboxes and used a
stringgrid.  The stringgrid was much easier to manipulate.

Re:Hiding the scrollbar of a TListBox among else...


Quote
> I've got two TListBoxes next to eachother. One of them is enabled while
> the other is disabled. I'd like the disabled listbox to scroll when the
> user scrolls the enabled listbox. Is this possible? There isn't an
> OnScroll event for the TListBox...

> I don't want the disabled listbox to display a scrollbar.

Try onchange or onclick?

Other Threads