Solved

VCL Component Creation Problem

Posted on 2000-05-03
4
131 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
  • 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

708 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now