Solved

DBGrid as ListBox?

Posted on 1997-07-02
2
586 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
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

856 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