Autor Beitrag
mimi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Fr 29.10.04 10:29 
Hallo,
ich habe jetzt über eine stunde gesucht und nichts gefunden was mir weiter geholfen hat !
ich möchte einfach eine einige eigenschaft erstellen:
code:
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
unit UDX;

interface

uses dialogs,Graphics,DXDraws, DXClass,jpeg,Forms,SysUtils,Classes,Types,Controls;

Type
  TMouseDown = procedure(x,y:Integer; Shift: TShiftState) of Object;
  TMouseMove = procedure(x,y:Integer; Shift: TShiftState) of Object;
  TMouseUp = procedure(x,y:Integer; Shift: TShiftState) of Object;
  TDraw = procedure of Object;

  TDX = Class
  private
    DXDraw1: TDXDraw;
    DXTimer1: TDXTimer;
    DXImageList1: TDXImageList;  
  public
    onMouseDown:TMouseDown;
    onMouseMove:TMouseMove;
    onMouseUp:TMouseUp;
    onDraw:TDraw;
    mx,my:Integer;
    Canvas:TCanvas;
    procedure DrawImage(Image:String; x,y:Integer);
    procedure DrawText(Text:String; x,y,size:Integer; FC,HC:TColor);
    procedure LoadImages(ImageFile:String);
    constructor Create(F1:TForm);
  end;

implementation

constructor TDX.Create(F1:TForm);
begin
end;

procedure TDX.DrawImage(Image:String; x,y:Integer);
begin
end;

procedure TDX.DrawText(Text:String; x,y,size:Integer; FC,HC:TColor);
begin
end;

procedure TDX.LoadImages(ImageFile:String);
begin
end;

end.


in diesem fall soll canvas die eigenschaft werden und eine einige procedure aufrufen, wenn man sie verändern wie kann ich dies tuen ???


Moderiert von user profile iconChristian S.: Topic aus VCL (Visual Component Library) verschoben am Fr 29.10.2004 um 12:44

_________________
MFG
Michael Springwald, "kann kein englisch...."
tommie-lie
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 4373

Ubuntu 7.10 "Gutsy Gibbon"

BeitragVerfasst: Fr 29.10.04 10:44 
Gesucht und nicht gefunden?
Schau mal in der Onlinehilfe nach "property", das sollte alle Klarheiten beseitigen ;-)

_________________
Your computer is designed to become slower and more unreliable over time, so you have to upgrade. But if you'd like some false hope, I can tell you how to defragment your disk. - Dilbert
mimi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Fr 29.10.04 11:42 
das bringt mich auch nicht viel weiter.
was ich breuchte währe ein einfachs beispiel.

_________________
MFG
Michael Springwald, "kann kein englisch...."
herzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 168

WINXP pro, SUSE Linux 9.0
D7 Pers.
BeitragVerfasst: Fr 29.10.04 12:07 
Das aber ganz bestimmt. Mit Beispiel sogar...

www.delphi-forum.de/...p;highlight=assigned

Da ist auch der Begriff Property mit drin !
wulfskin
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1349
Erhaltene Danke: 1

Win XP
D5 Pers (SSL), D2005 Pro, C, C#
BeitragVerfasst: Fr 29.10.04 12:09 
Bin jetzt zu faul die ein Beispiel zu schreiben. Schau einfach mal hier:
www.delphi-source.de...ials/tswitch/?page=2

Gruß Hape!

_________________
Manche antworten um ihren Beitragszähler zu erhöhen, andere um zu Helfen.
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Fr 29.10.04 12:22 
ausblenden Delphi-Quelltext
1:
Property Canvas: TCanvas read FCanvas write SetCanvas;					


Ansonsten OH bzgl. Write-Klausel kontaktieren.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
mimi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Fr 29.10.04 21:05 
Danke BenBE dein beispiel hat mir weitergeholfen *G*
jetzt muss ich doch einfach nur folgenden code schreiben:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
Type
....
  FCanvas:TCanvas;
  property Canvas: TCanvas read FCanvas write SetCanvas;

procedure SetCanvas;
begin
  DXdraw1.Surface.Canvas:=FCanvas
end;


kann FCanvas auch eine funktion sein ?
z.b. so
property Canvas:TCanvas read GetCanvas write SetCanvas;
würde das auch gehen ???
mein ziel ist es wenn ich die eigenschaft canvas Benutze soll die funktion SetCanvas aufgerufen werden und wenn ich die abfragen möchte soll GetCanvas aufgerufen werden !

_________________
MFG
Michael Springwald, "kann kein englisch...."
tommie-lie
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 4373

Ubuntu 7.10 "Gutsy Gibbon"

BeitragVerfasst: Fr 29.10.04 21:07 
Ja, klappt auch, GetCanvas muss dann eine function sein und Canvas als Result-Typ zurückgeben.

_________________
Your computer is designed to become slower and more unreliable over time, so you have to upgrade. But if you'd like some false hope, I can tell you how to defragment your disk. - Dilbert
mimi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Sa 30.10.04 08:30 
OK: Vielen Dank :D ich werds gleich ausprobieren *G*

_________________
MFG
Michael Springwald, "kann kein englisch...."