Solved

component properties

Posted on 2001-07-01
2
198 Views
Last Modified: 2010-04-06
How can i see on runTime list of component properties
0
Comment
Question by:asi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 8

Accepted Solution

by:
Cesario earned 30 total points
ID: 6243887
Hi asi

this small application list all Properties for a given Component.


unit Unit21;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls;

type
  TForm1 = class(TForm)
    ListBox1: TListBox;
    procedure FormCreate(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

uses TypInfo;

procedure ObjectInspector(
  Obj   : TObject;
  Items : TStrings );
var
  n        : integer;
  PropList : TPropList;
begin
  n := 0;
  GetPropList(
    Obj.ClassInfo,
    tkProperties + [ tkMethod ],
    @PropList );
  while( (Nil <> PropList[ n ]) and
         (n < High(PropList)) ) do
  begin
    Items.Add(
      PropList[ n ].Name + ': ' +
      PropList[ n ].PropType^.Name );
    Inc( n );
  end;
end;


procedure TForm1.FormCreate(Sender: TObject);
begin
  // List the Listbox Properties
  ObjectInspector( ListBox1, ListBox1.Items );
end;

Best Regards

Cesario

end.
0
 

Author Comment

by:asi
ID: 6244100
I didn't test it but its look promises ...
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question