Delphi programming help with some issue

Discussion in 'Programming' started by ninadbe, Jul 2, 2013.

  1. #1
    procedure TMyForm.FormCreate(Sender: TObject);
    var
    Group: TListGroup;
    Item: TListItem;
    s1, s2: string;
    begin
    ListView1.ViewStyle := vsReport;
    ListView1.GroupView := True;
    ListView1.Columns.Add.Caption := 'My column';
    Group := ListView1.Groups.Add;
    Group.Header := 'My header';
    Group.GroupID := 0;
    Item := ListView1.Items.Add;
    Item.GroupID := 0;
    Item.Caption := 'My item';

    end

    I copy pasted above code on my RAD Embarcadeo delphi form code. But why I am not getting
    components automatically on the form after pasting above code at suitable place on CODE tab...
    Instead it is giving many errors like


    Undeclared identifier TListGroup at line 27
    Undeclared identifier TListItem at line 28
    Undeclared identifier ListView1 at line 31
    Undeclared identifier ViewStyle at line 31
    Undeclared identifier vsReport at line 31
    Undeclared identifier GroupView at line 32
    Undeclared identifier TListGroup at line 27
     
    Solved! View solution.
    ninadbe, Jul 2, 2013 IP
  2. #2
    that is a good question to ask the developers since it is annoying me as well. you have to drop in the components, correct the namespace and maybe then it works ;)
     
    pro2sell, Jul 12, 2013 IP
  3. ninadbe

    ninadbe Member

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #3
    Pro2sell , thanks for reply...Are you Delphi expert ?
     
    ninadbe, Aug 8, 2013 IP
  4. pro2sell

    pro2sell Active Member

    Messages:
    35
    Likes Received:
    0
    Best Answers:
    2
    Trophy Points:
    58
    #4
    I think so. Other people call me an expert, so I might be something like that ;)
     
    pro2sell, Aug 10, 2013 IP