Jump to content
Squall_FF8

Change of column widths of ListField in TDBLookupComboBox

Recommended Posts

Hey guys,

I have TDBLookupComboBox with multiple columns specified in ListField, that are displayed during DropDown.

How I can change the width of individual column there? The defaults puts too much space between.
Also is there a way to put a header on columns?

Share this post


Link to post

You need to set the DisplayWidth property for the list fields of the list lookup dataset.

Quote

is there a way to put a header on columns?

AFAIK no.

Share this post


Link to post
27 minutes ago, Kryvich said:

You need to set the DisplayWidth property for the list fields of the list lookup dataset.

DisplayWidth change the width of the whole Drop down, I'm trying to change the widths of individual columns inside that DropDown.
Let say I have 3 fields in ListField: Field1, Field 2 and Field 3. I want to change how wide they are during DropDown. 

Share this post


Link to post

@Squall_FF8

DataModule.LookupDatasetField1.DisplayWidth := 10;

DataModule.LookupDatasetField2.DisplayWidth := 20;

DataModule.LookupDatasetField3.DisplayWidth := 30;

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×