AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Komponenten testen / debuggen

Ein Thema von Meta777 · begonnen am 4. Apr 2005 · letzter Beitrag vom 20. Apr 2005
 
Alter Mann

Registriert seit: 15. Nov 2003
Ort: Berlin
949 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#6

Re: Komponenten testen / debuggen

  Alt 20. Apr 2005, 17:25
Hallo Meta777,

mach es doch so:

- Neue Anwendung
- Alle Componenten die Du benötigst und deren Sources Du hast auf die Form
- Alle Einstellungen in Object-Inspector vormehmen

dann sieht es so aus:
Delphi-Quellcode:
...
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Buttons, StdCtrls;

type
  TForm1 = class(TForm)
    lbPath : TLabel;
    cboPath : TComboBox;
    sbtnPathSearch: TSpeedButton;
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;
...
Nun, wollen wir die ComboBox genauer untersuchen.

das geht so:

- die Zeile mit der entsprechnden Compnetendeklaration, makieren und kopiere
- anschließend, die entsprechnde Componete von der Form löschen
- die Componentendeklaration im private Bereich einfügen

Delphi-Quellcode:
...
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Buttons, StdCtrls;

type
  TForm1 = class(TForm)
    lbPath : TLabel;
    sbtnPathSearch: TSpeedButton;
  private
    { Private-Deklarationen }
    cboPath : TComboBox;
  public
    { Public-Deklarationen }
  end;
...
Nun noch ein Create und ein Destroy Ereignis deklarieren.
Und unsere ComboBox erstellen:

Delphi-Quellcode:
...
procedure TForm1.FormCreate(Sender: TObject);
begin
  cboPath := TComboBox.Create(Form1);
  with cboPath do
  begin
    Left := 62;
    Top := 14;
    Width := 145;
    Height := 21;
end;

procedure TForm1.FormDestroy(Sender: TObject);
begin
  cboPath.Free
end;
...
So, nun kannst Du den Breakpoint bein erstellen der ComboBox setzen.

Gruß
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 06:41 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz