Solved

VCL Component Creation Problem

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

ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
find a node in VST 2 69
Run video youtube webbrowse 10 62
Firemonkey DbLookupComboBox equivalent ? 2 48
Tvertscrollbox like a whatsapp layout delete messages 1 18
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…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

803 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