Autor Beitrag
Borni
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 23



BeitragVerfasst: Do 07.07.05 11:24 
Moin Leude!

Ist es möglich ein Shape über ein DrawGrid zu zeichnen? Bei mir wird wird das Shape immer nur hinter dem DrawGrid gezeichnet. Ein "BringToFront" bringt da leider auch nicht. Kann mir da jemand helfen?

Gruß
Borni
Borni Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 23



BeitragVerfasst: Di 12.07.05 15:12 
Moin Leude!

Ich habe nun die Lösung gefunden. Für alle die es interessiert:

Wenn man ein Shape auf dem DrawGrid zeichnen möchte, dann muss man im OnCreate die Zeile

ausblenden Delphi-Quelltext
1:
Shape_Selection.Parent := DrawGrid1					


eintragen, da zur Designzeit ein Drawgrid keine Komponenten akzeptiert und diese durch das Canvas übermalen würde. Durch OnMouseDown, OnMouseMove und OnMouseUp kann man dann ohne Probleme eine Selektion realisieren. Es wird also nicht das OnDrawCell-Ereignis dafür benötigt.

Viele Grüße
Borni