T
ok, hier mal der Header....
#ifndef LineStripControlH
#define LineStripControlH
//---------------------------------------------------------------------------
#include <SysUtils.hpp>
#include <Classes.hpp>
#include <Controls.hpp>
//---------------------------------------------------------------------------
class PACKAGE TLineStripControl : public TGraphicControl
{
private:
TLineStrips* strips;
int FLineSize;
int FBorderWidth;
bool FBorder;
bool FClosedLine;
TColor FBorderColor;
TColor FLineColor;
void __fastcall _onMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
void __fastcall _onMouseMove(TObject *Sender, TShiftState Shift, int X, int Y);
void __fastcall _onMouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
void __fastcall _onDblClick(TObject *Sender);
void __fastcall _onClick(TObject *Sender);
// Helper
int MX, MY;
/*...
... */
bool ondrag;
protected:
void __fastcall Paint(void);
void __fastcall set_LineSize(int Value);
void __fastcall set_Border(bool value);
void __fastcall set_FBorderWidth(int Value);
void __fastcall set_ClosedLine(bool value);
void __fastcall set_BorderColor(TColor value);
void __fastcall set_LineColor(TColor value);
public:
void __fastcall Loaded();
__fastcall TLineStripControl(TComponent* Owner);
__fastcall ~TLineStripControl();
__published:
__property bool Rand = {read=FBorder, write=set_Border, default=true};
__property bool ClosedLine = {read=FClosedLine, write=set_ClosedLine, default=true};
__property TColor BorderColor = {read=FBorderColor, write=set_BorderColor, default=clBlack};
__property TColor LineColor = {read=FLineColor, write=set_LineColor, default=clBlack};
__property int LineSize = {read=FLineSize,write=set_LineSize,default=1};
__property int BorderWidth = {read=FBorderWidth,write=set_FBorderWidth,default=1};
};
//---------------------------------------------------------------------------
#endif
sooo, und hier noch mal der Konstuktor
__fastcall TLineStripControl::TLineStripControl(TComponent* Owner): TGraphicControl(Owner)
{
// eigene Variablen
// Eigenschaften
Width = 50;
Height = 50;
FLineSize = 1;
FBorderWidth = 1;
FBorder = true;
FClosedLine = true;
FBorderColor = clBlack;
FLineColor = clBlack;
// Eventhandler
OnDblClick = _onDblClick;
OnClick = _onClick;
OnMouseDown = _onMouseDown;
OnMouseUp = _onMouseUp;
OnMouseMove = _onMouseMove;
}
Wie man sieht ist alles richtig initialisiert, und so langsam aber sicher gehen mir die Ideen aus woran das noch liegen könnte. RTTI ist im übrigen im Compiler aktiviert,scheidet also vorläufig erst mal aus als mögliche Fehlerquelle.
Sooo, ich hoffe der Code hilft erst mal ein bissl weiter......
MfG TFX