Autor Beitrag
Ice
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 114



BeitragVerfasst: Mo 17.02.03 15:19 
Hallo Leute,

ich habe ein Problem, und zwar versuche ich mit:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
procedure TMainDia.PlanShapeMouseDown(Sender: TObject;
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
 //if Draw then
  //begin
  Canvas.MoveTo(X,Y);
 // end;
end;

procedure TMainDia.PlanShapeMouseUp(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
 //if Draw then
 // begin
   Canvas.LineTo(X,Y);
 // end;
end;

auf ein Shape zu zeichnen welches sich in einer GroupBox befindet.... allerdings wird nur auf dieForm selber und nicht auf das Shape oder die GroupBox gezeichnet. Muss ich da noch etwas wie parents oder sowas verändern oder gibt es da etwas anderes was ich vergessen habe?

Vielen Dank im voraus...

mfg
Ice

Moderiert von user profile iconTino: Code-Tags hinzugefügt.
smiegel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 992
Erhaltene Danke: 1

WIN 7
D7 Prof., C#, RAD XE Prof.
BeitragVerfasst: Mo 17.02.03 15:32 
Hallo,

Du musst schon angeben, auf welchem Canvas Du zeichnen willst. Und Canvas.MoveTo(x, y) zeichnet auf dem Canvas der Form.

Wenn mich nicht alles täuscht, besitzt TShape keinen Canvas, also wird das auch nicht funktionieren.

_________________
Gruß Smiegel
Ich weiß, daß ich nichts weiß, aber ich weiß mehr als die, die nicht wissen, daß sie nichts wissen. (Sokrates)
Ice Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 114



BeitragVerfasst: Mo 17.02.03 15:42 
:shock: Danke für die schnelle Antwort aber eine Frage hätte ich da noch, gibt es ne Komponente die ein Canvas beinhaltet und wenn Ja welche???
:?:
mfg
Ice
smiegel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 992
Erhaltene Danke: 1

WIN 7
D7 Prof., C#, RAD XE Prof.
BeitragVerfasst: Mo 17.02.03 15:53 
Hallo,

ich benutze in Regel eine PaintBox. Mit einem Image.Bitmap geht's natürlich auch.

_________________
Gruß Smiegel
Ich weiß, daß ich nichts weiß, aber ich weiß mehr als die, die nicht wissen, daß sie nichts wissen. (Sokrates)
Ice Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 114



BeitragVerfasst: Mo 17.02.03 15:57 
:) Alles klar und vielen Dank nochmal....

mfg
Ice