Solved

DBGrid as ListBox?

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

762 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

18 Experts available now in Live!

Get 1:1 Help Now