
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
Datafield
Datasource
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?
Thanks!
--Wilson
I could not love thee half so much
Loved I not honor more.
--Robert Browning