after Chris set me on track re class vars, i realized that i might initialize brush and colorobject once as class var in the owning window, which later on the the sle instances might use. In constructor something like
Code: Select all
CLASS dta_Konzerte INHERIT pdta_Konzerte
STATIC oOldBrush, oPause AS Brush
STATIC oC AS Color
CONSTRUCTOR(oWindow,iCtlID,oServer,uExtra)
...
SUPER(oWindow,iCtlID,oServer,uExtra)
..
dta_Konzerte.oC := Color{COLORYELLOW}
dta_Konzerte.oPause:= Brush{oC}
Return
Code: Select all
METHOD DESTRUCTOR()
dta_Konzerte.oC:= NULL_OBJECT
dta_Konzerte.oPause:=NULL_OBJECT
SUPER:Destroy()
RETURN
2) in the constructor of the sle i set
Code: Select all
SELF:Background:=dta_Konzerte.oPause
Code: Select all
SELF:Background:= Brush{Color{COLORYELLOW}}
Alternatively it put this in a show() of the sle, but that doesn't help, too.
3) ultimately, the background should depend on the textvalue of the sle, probably the check should be put into the window's notify or better in the editfocuschange?
Sorry for stupid questions, but i finally decided to put away with my shame, to learn something...