-
Adding horizontal scroll bar to a combo box
Hello,
(Newbie question) I am working on an reporting app that allows user to
select parameters that are in a combo box. The problem is that the data
in the combo box is much longer than the actual combo box. I am trying to
allow the user to see all of the descriptions. So far I have tried increasing
the drop-down width using cb_setdroppedwidth. While that worked on some
combo boxes, it caused issues when the combo box was placed near the edge
of the form.
Does anyone have any suggestions on how to either add a scroll bar to the
combo box....or other options that I may try? Would cb_sethorizontalextent
work? Any suggestions would be appreciated.
Thanks,
Kevin
-
Re: Adding horizontal scroll bar to a combo box
Kevin,
> Does anyone have any suggestions on how to either add a scroll bar to the
>combo box....or other options that I may try? Would cb_sethorizontalextent
>work?
CB_SETHORIZONTALEXTENT only works if the conjtrol was created with the
WS_HSCROLL style set. And unfortunately, the VB Combobox isn't. If you
check out Matthew Curland's VBPJ article from about a year ago (I
think it was called "Modify a control's style" or something like
that), you might find a workaround. Your other options are to create
the control yourself using the CreateWinwodEx API or find a third
party control that supports it.
Matt
============================================
Mattias Sjögren - mattiass @ hem.passagen.se
VB+ - http://hem.spray.se/mattias.sjogren/
CodeHound - Free VB Search Engine
http://www.codehound.com
-
Re: Adding horizontal scroll bar to a combo box
Kevin,
> Does anyone have any suggestions on how to either add a scroll bar to the
>combo box....or other options that I may try? Would cb_sethorizontalextent
>work?
CB_SETHORIZONTALEXTENT only works if the conjtrol was created with the
WS_HSCROLL style set. And unfortunately, the VB Combobox isn't. If you
check out Matthew Curland's VBPJ article from about a year ago (I
think it was called "Modify a control's style" or something like
that), you might find a workaround. Your other options are to create
the control yourself using the CreateWinwodEx API or find a third
party control that supports it.
Matt
============================================
Mattias Sjögren - mattiass @ hem.passagen.se
VB+ - http://hem.spray.se/mattias.sjogren/
CodeHound - Free VB Search Engine
http://www.codehound.com
-
Re: Adding horizontal scroll bar to a combo box
I had a similar situation. I solved it by putting the item under the mouse
into a tooltip. Eric has a sample of my code on his site:
http://www.redleif.com/vb/example_so...tboxhover.html
Where Eric has "Label1.Caption = List1.List(lR)" use "cbo.ToolTip =
cbo.List(lR)". I've never tried this on a cbo so you might need to do some
conversions.
--
~~~
C'Ya,
mrfelis
mrfelis@yahoo.NOSPAM.com
just remove the spam
Kevin McCormack <mccormackk@discovermercatus.com> wrote in message
news:39770699$1@news.devx.com...
>
> Hello,
>
> (Newbie question) I am working on an reporting app that allows user to
> select parameters that are in a combo box. The problem is that the data
> in the combo box is much longer than the actual combo box. I am trying to
> allow the user to see all of the descriptions. So far I have tried
increasing
> the drop-down width using cb_setdroppedwidth. While that worked on some
> combo boxes, it caused issues when the combo box was placed near the edge
> of the form.
>
> Does anyone have any suggestions on how to either add a scroll bar to
the
> combo box....or other options that I may try? Would
cb_sethorizontalextent
> work? Any suggestions would be appreciated.
>
> Thanks,
> Kevin
-
Re: Adding horizontal scroll bar to a combo box
I had a similar situation. I solved it by putting the item under the mouse
into a tooltip. Eric has a sample of my code on his site:
http://www.redleif.com/vb/example_so...tboxhover.html
Where Eric has "Label1.Caption = List1.List(lR)" use "cbo.ToolTip =
cbo.List(lR)". I've never tried this on a cbo so you might need to do some
conversions.
--
~~~
C'Ya,
mrfelis
mrfelis@yahoo.NOSPAM.com
just remove the spam
Kevin McCormack <mccormackk@discovermercatus.com> wrote in message
news:39770699$1@news.devx.com...
>
> Hello,
>
> (Newbie question) I am working on an reporting app that allows user to
> select parameters that are in a combo box. The problem is that the data
> in the combo box is much longer than the actual combo box. I am trying to
> allow the user to see all of the descriptions. So far I have tried
increasing
> the drop-down width using cb_setdroppedwidth. While that worked on some
> combo boxes, it caused issues when the combo box was placed near the edge
> of the form.
>
> Does anyone have any suggestions on how to either add a scroll bar to
the
> combo box....or other options that I may try? Would
cb_sethorizontalextent
> work? Any suggestions would be appreciated.
>
> Thanks,
> Kevin
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks