Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: D10: regression in Dbgrid.Columns.PickList with Styles


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 1 - Last Post: Dec 4, 2015 1:58 AM Last Post By: jesu ortega
jesu ortega

Posts: 68
Registered: 9/28/01
D10: regression in Dbgrid.Columns.PickList with Styles  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 3, 2015 1:12 AM
When using VCL.Styles, picklist is painted badly and selecting with the mouse doesn't work. Just create a form with these components:

  object DBGrid1: TDBGrid
    Left = 0
    Top = 0
    Width = 734
    Height = 369
    Align = alClient
    DataSource = DataSource1
    TabOrder = 0
    TitleFont.Charset = DEFAULT_CHARSET
    TitleFont.Color = clWindowText
    TitleFont.Height = -11
    TitleFont.Name = 'Tahoma'
    TitleFont.Style = []
    Columns = <
      item
        Expanded = False
        FieldName = 'texto'
        Width = 412
        Visible = True
      end>
  end
  object DataSource1: TDataSource
    DataSet = ClientDataSet1
    Left = 200
    Top = 120
  end
  object ClientDataSet1: TClientDataSet
    Aggregates = <>
    Params = <>
    Left = 272
    Top = 120
    object ClientDataSet1texto: TWideStringField
      FieldName = 'texto'
      Size = 100
    end
  end


and use this code:

procedure TForm1.FormShow(Sender: TObject);
var
  i: Integer;
begin
  with ClientDataSet1 do
  begin
    Close;
    CreateDataSet;
    EmptyDataSet;
  end;
  for i := 1 to 10 do
    Dbgrid1.Columns[0].PickList.Add('line ' + i.ToString);
  dbgrid1.Columns[0].DropDownRows := 10;
end;


If you try to select line10 with the mouse, the wrong item is selected.

In XE7 it works right. Any solution?

TIA
jesu ortega

Posts: 68
Registered: 9/28/01
Re: D10: regression in Dbgrid.Columns.PickList with Styles  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 4, 2015 1:58 AM   in response to: jesu ortega in response to: jesu ortega
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02