How to create TsCombobox programmatically and properly

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #32991
    OldGrumpy
    Participant

    Hi there,

    I once more encountered a small problem. I don't know if this is a bug so I decided to post here first. I'll attach a simple demo program to demonstrate the effect to this post. I create a TsCombobox programmatically at runtime. This works okay, but the font color of the TsCombobox is not set properly. Did I miss to set any property when creating the control? I used these lines to instantiate the control:

    CODE
      fcombo1:=TsCombobox.Create(MyForm);
      fcombo1.parent:=MyForm;
      fcombo1.Left:=10;
      fcombo1.Top:=10;
      fcombo1.Width:=50;
      fcombo1.Height:=20;
      fcombo1.Items.Add('X');
      fcombo1.Items.Add('Y');
      fcombo1.Items.Add('Z');
      fcombo1.ItemIndex:=0;
      fcombo1.Style:=csDropDownList;

    Here is the demo project: [attachment=3293:TsCombobox_Problem.zip]

    #39386
    Support
    Keymaster

    It's a problem of TsComboBox control, will be solved in the next release.
    Patched file was sent to you by PM

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.