Topic: combo box
Hello MVD!
In my project i have text field defined which has a long text input and it should be displayed in the combo box. Is the a way to stretch the long fields to fit in the combo box? Please help!
Thanks!
My Visual Database → General → combo box
Hello MVD!
In my project i have text field defined which has a long text input and it should be displayed in the combo box. Is the a way to stretch the long fields to fit in the combo box? Please help!
Thanks!
procedure Form1_ComboBox1_OnDropDown (Sender: TObject);
var
i, L, mWidth: integer;
begin
mWidth:=0;
for i := 0 to Form1.ComboBox1.Items.Count - 1 do
if (Form1.Canvas.TextWidth(Form1.ComboBox1.Items[i]) > mWidth) then mWidth := Form1.Canvas.TextWidth(Form1.ComboBox1.Items[i])+20;
SendMessage(Form1.ComboBox1.Handle, $0160, mWidth, 0);
end;
Thanks sibprogsistem,
What about to fit in multiline?
Thanks!
sibprogsistem
Nice example! Thanks.
My Visual Database → General → combo box
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi