Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

VCL Component Creation Problem

Posted on 2000-05-03
4
Medium Priority
?
138 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 2000 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

715 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