Autor Beitrag
Flash106
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 234


D7 Ent
BeitragVerfasst: So 30.01.05 12:44 
Kann mir mal jemand nen codeschnippsel geben wie ich eine combobox mit label erstelle? soll eine eigene komponenten sein. die combobox kann ich erstellen aber das lebel wird nicht angezeigt.. hier mal der constructor teil:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
constructor TmyDBLabeledComboBox.Create(AOwner: TComponent);
begin
  inherited;

  Width := 200;

  lblCaption := TLabel.Create(Self);

  with lblCaption do begin
    Parent      := Self;
    Left        := 0;
    AutoSize    := False;
    Layout      := tlCenter;
    Height      := 21;
    Transparent := True;
    Caption     := 'Caption';
  end;
end;


daaaanke!!


Moderiert von user profile iconraziel: Topic aus Programmierwerkzeuge verschoben am So 30.01.2005 um 12:50
Elite
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: So 30.01.05 13:01 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
constructor TmyDBLabeledComboBox.Create(AOwner: TComponent);
begin
  inherited;

  Width := 200;

  lblCaption := TLabel.Create(self);

  with lblCaption do begin
    Parent      := self.Parent;
    Left        := 0;
    AutoSize    := False;
    Layout      := tlCenter;
    Height      := 21;
    Transparent := True;
    Caption     := 'Caption';
  end;
end;

Kein Delphi zur Hand, probiers einfach mal aus!

Moderiert von user profile iconraziel: Highlight-Tag hinzugefügt - hab mich grad dumm und dämlich gesucht ;)