Solved

VCL Component Creation Problem

Posted on 2000-05-03
4
136 Views
Last Modified: 2010-04-04
I need to make a component that when you use object inspector you see information in groups.

 I.E. there is a little + symbol beside each group and when you double click on it, you can edit the data in that group.

 I.E. When you put a label on a form, and edit the label with the object inspector(window) you see...

Align
Alignment
+Anchors
AutoSize

If someone can give me a very simple working component that does this that would be great. I Will give more points depending on the answer.

My component has to look like this...

MyComponent
+DataA
      .ValueX : Integer
      .ValueY : Integer
+DataB
      .ValueX : Integer
      .ValueY : Integer
.Means : Integer

0
Comment
Question by:gavar
[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
  • 2
4 Comments
 
LVL 1

Expert Comment

by:divnet
ID: 2776933
I think this is worth more then 50 points! but here is the full source for a component to do what you want it to.

unit testIT;

interface

uses
  Windows, Messages, Classes, Controls, Graphics, extCtrls, stdctrls,
  Forms, sysutils, dialogs;

type
  tData = Class(TPersistent)
  private
    x,y : integer;
  public
  published
    property DataX : Integer read x write x default 0;
    property DataY : Integer read y write y default 1;
  end;

  TtestIT = Class(TComponent)
  private
    fdata : tdata;
    FEnabled : Boolean;
    procedure SetEnabled(Value: Boolean);
  protected
  public
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;
  published
    property Enabled : Boolean read FEnabled write SetEnabled default True;
    property data : tdata read fdata write fdata;
  end;


procedure Register;

implementation

constructor Ttestit.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
  FEnabled := True;
  fdata := tdata.create;
end;
procedure TtestIt.SetEnabled(Value: Boolean); begin if Value <> FEnabled then FEnabled := Value; end;
destructor TtestIT.Destroy; Begin FEnabled := False; inherited Destroy; end;

procedure Register;
begin
  RegisterComponents('Test IT', [tTestit]);
end;

end.
0
 

Author Comment

by:gavar
ID: 2776963
Adjusted points from 50 to 480
0
 
LVL 1

Accepted Solution

by:
divnet earned 500 total points
ID: 2776989
My Answer was my comment up above.

0
 

Author Comment

by:gavar
ID: 2777017
Adjusted points from 480 to 500
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

Suggested Solutions

Title # Comments Views Activity
Connection between libmysql.dll and MySQL Versions 7 132
How to debug For loops? 3 74
Delphi: making a BW image transparent 10 137
Delphi, TImage, Png 2 54
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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

734 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