?
Solved

component properties

Posted on 2001-07-01
2
Medium Priority
?
200 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 120 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

765 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