DBGrid as ListBox?

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
Rick_SAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
ronit051397Connect With a Mentor Commented:
To get rid of the horizenal scrollbar, try:
  SetScrollRange(DBGrid1.Handle, SB_HORZ, 0, 0, False);
0
 
Rick_SAuthor Commented:
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
All Courses

From novice to tech pro — start learning today.