Solved

TListBox and ScroolBars

Posted on 1998-05-26
2
604 Views
Last Modified: 2012-06-21
How to make a ListBox with horizontal ScrollBar,
and how to make ListBox without any ScroolBars?
0
Comment
Question by:bor061297
2 Comments
 
LVL 1

Expert Comment

by:bsimser
ID: 1347998
If you make a listbox and the items are wider than the listbox, it will automatically scroll horizontally for you. As for making a listbox without scrollbars, you won't see any scrollbars if your items don't exceed the height of the listbox. If you want to make a listbox not scroll, set the Style property to lbOwnerDrawFixed or lbOwnerDrawVariable and override the paint method to draw your items.
0
 
LVL 5

Accepted Solution

by:
ronit051397 earned 50 total points
ID: 1347999
To make horizontal ScrollBar write:
ListBox1.Perform(LB_SETHORIZONTALEXTENT,500,0);
To hide verticall ScrollBar write:
SetScrollRange(ListBox1.Handle, SB_VERT,0,0,True);
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now