Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

TElComboBox in Rad Studio 10.4 - Delphi.

Hi,

After I compiled my application, I found that the TElComboBox does not paint correctly. The text and the drop down is simply white. In a few cases, the text does show, but only until I select another item. It also happens on drop downs controls in TElXTree.

It is hard to duplicate in a separate project, because when I simply copy a TElComboBox  from my projects to another simple project with a form, it does not happen.
I do find it in all the places in my current project anyways.

I was wondering if it could have something to do with the New Delphi 10.4 "Style per control" that may somehow set a value for these controls. Not that I tried to use or know how to sue the "Style per control" at all.

Regards,
Louis.

Comments

  • 7 Comments sorted by Votes Date Added
  • As you mentioned, the issue is not reproduccible in simple application. Cannot imagine how can I help you.
  • Hi,

    I traced it to happen when I do an assign to the items of the TElComboBox. 

    E.g. in a new Delphi 10.4 32 bit windows vcl application, at designtime, 
    add a ElComboBox1: TElComboBox, ListBox1: TListBox and Button1: TButton to the form.

    At design time, set the items of ElComboBox1 to
    A
    B
    C

    and set the items of Listbox1 to
    E
    F
    F.

    Set the onclick event for Button1 to:

    procedure TForm1.Button1Click(Sender: TObject);
    begin
      ElComboBox1.Items.Assign(ListBox1.Items)
    end;

    Run the program.
    Click the drop down arrow of ElComboBox1, and the A, B and C apears in the list for selection. That is normal.

    Now click Button1, which will assign the items from listbox1.items to ElComboBox1.Items.

    Again click the drop down arrow of ElComboBox1, and the items are shown "blank".

    listbox1.items cna be nay other TStrings instance that contaions items.

    I also copied and pasterd the .pas and .dfm to the end below.

    Regards,
    Louis.

    ---- .pas
    unit Unit1;

    interface

    uses
      Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
      Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, ElXPThemedControl, ElEdits, ElBtnEdit, ElCombos;

    type
      TForm1 = class(TForm)
        ElComboBox1: TElComboBox;
        ListBox1: TListBox;
        Button1: TButton;
        procedure Button1Click(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;

    var
      Form1: TForm1;

    implementation

    {$R *.dfm}

    procedure TForm1.Button1Click(Sender: TObject);
    begin
      ElComboBox1.Items.Assign(ListBox1.Items)
    end;

    end.

    -- .dfm

    object Form1: TForm1
      Left = 0
      Top = 0
      Caption = 'Form1'
      ClientHeight = 195
      ClientWidth = 635
      Color = clBtnFace
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'Tahoma'
      Font.Style = []
      OldCreateOrder = False
      PixelsPerInch = 96
      TextHeight = 13
      object ElComboBox1: TElComboBox
        Left = 40
        Top = 16
        Width = 265
        Height = 21
        Cursor = crIBeam
        Hint = ''
        StyleName = ''
        SaveUnicode = True
        Items.Strings = (
          'A'
          'B'
          'C')
        ItemHeight = 13
        UseCustomScrollBars = False
        Text = 'ElComboBox1'
        AltButtonUsePng = False
        TabOrder = 0
        ParentColor = False
        HideFocusRect = False
      end
      object ListBox1: TListBox
        Left = 40
        Top = 43
        Width = 121
        Height = 62
        ItemHeight = 13
        Items.Strings = (
          'D'
          'E'
          'F')
        TabOrder = 1
      end
      object Button1: TButton
        Left = 240
        Top = 72
        Width = 75
        Height = 25
        Caption = 'Button1'
        TabOrder = 2
        OnClick = Button1Click
      end
    end



  • Issue confirmed. Need some time to look...
  • Fixed.
  • Thanks Eugene.

    Should I simply re-download from the Customer Area, and re-install?

    Regards,
    Louis
  • No. Unless you own LMD VCL complete (which provides access to our GIT with sources) you have to wait for the next minor release.
  • Thanks for the released version with fix.
Sign In or Register to comment.