Changing display width in DBLookupListBox 
Author Message
 Changing display width in DBLookupListBox

How do you adjust the width of display fields in a DBLookupListBox?

In SQL Server 2000, I have a table which includes fields:

NextEvCode varchar(6) not null
NextEvNum int identity not null

In my delphi application, I access this through a TQuery of

SELECT * from EvNext
    WHERE ...

which is in turn accessed by a DBLookupComboBox. This
DBLEvNext is not expected to modify any data, so its
properties are

Keyfield    NextEvCode;NextEvNum
Listfield     NextEvCode;NextEvNum
Listsource [my TQuery on EvNext]

This works great, except for the fact that the display looks like this
EML00(                    1
RML02(                    5

where the ( represents a zero chopped in half. It doesn't allocate enough
display space to NextEvCode. This isn't the first time I've seen this
happen; it seems to happen a lot with varchar fields. Can anyone tell
me what's going on, or how to work around or fix it?



I could not love thee half so much
Loved I not honor more.
    --Robert Browning

Tue, 25 May 2004 02:21:56 GMT  
 [ 1 post ] 

 Relevant Pages 

1. changing column widths in DBGrids

2. how to Detect column width change

3. How to update a display when the file is changed by another computer

4. Changing data just for display

5. Refreshing display if table changes

6. DBGrid Changing color of selected line and Time Display Problem

7. How can I sort a DBLookuplistbox???

8. Begin or End of table error using DBlookuplistbox component

9. OnDblClick in DBLookupListBox

10. Focus in DBLookupListBox?

11. Items count for a DBlookuplistbox?

12. DBLookupListBox weird behavior


Powered by phpBB® Forum Software