Solved

DBGrid as ListBox?

Posted on 1997-07-02
2
587 Views
Last Modified: 2010-04-06
I read the answer to the quesion answered below ( ListBox as Database Navigator ) I need to do the same thing and found javiertb and sholmes comments very useful. I have my DBGrid/Listbox all set up but here is the question I have:
- Can you get rid of the horizontal scroll bar for fields that are wider than DBGrid (just truncate the text / empty space if it's to long). If I make the DBGrid wide enough the The horizontal scroll bar will go away but then there always seems to be extra space at the bottom of the DBGrid box.
- Also, when the user uses the vertical scroll bar the item is changed i.e. If the user has the first item in the box/Grid selected and then tries to scroll down the item selection changes without the user ever doing anything besides scrolling down the grid. Can I stop this from happening.

Besides those two or three things the DBGrid works great for a navigating listbox. Could someone please let me know what I can do about this?

Thanks,
Rick S.
Rick@MessageLink.com
0
Comment
Question by:Rick_S
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Accepted Solution

by:
ronit051397 earned 50 total points
ID: 1338094
To get rid of the horizenal scrollbar, try:
  SetScrollRange(DBGrid1.Handle, SB_HORZ, 0, 0, False);
0
 

Author Comment

by:Rick_S
ID: 1338095
That didn't quit work but using it i did find info on SetScrollInfo which had info on doing the same sort of thing
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

726 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