Am Montag, den 02.01.2006, 22:58 +0100 schrieb dannym:
> Hi,
>
> Am Montag, den 02.01.2006, 22:18 +0100 schrieb Marc Santhoff:
> > Hi,
> >
> > I'm setting the 'color' property of a TPanel and it is getting pretty
> > green. If set back to 'clBtnFace' nothing happens.
> >
> > procedure TKeyboardForm.rgTestTypeClick(Sender: TObject);
> > begin
> >
> > if (TRadioGroup(Sender).itemindex = 1) then begin
> > ...
> > lbSignal.Caption := 'Bitte *jede* Taste einmal drücken!';
> > pnKeyboard.Color := clGreen;
> > pnKeyboard.refresh;
> > (* This does work, the panel is getting green. *)
> > end;
> > end;
> > end;
> >
> > procedure TKeyboardForm.bbStopClick(Sender: TObject);
> > begin
> > ...
> > lbSignal.Caption := 'Abgebrochen.';
> > pnKeyboard.Color := clBtnFace;
> > pnKeyboard.invalidate;
> > pnKeyboard.paint;
> > (* Here nothing happens on the panel, it stays green. *)
> > ...
> > end;
> > end;
> >
> > The caption of the label is set correctly in both cases. Instead of
> > 'paint' I tried several combinations of 'refresh', 'redraw' and
> > 'invalidate', with no positive result.
> >
> > I remember something around colors and paint, so it may be a faq ...
>
> Probably a bug..
Seems to be, but maybe WindowMaker or something else is mixing things up
here.
I tried other components and invalidated the form and they behave
different:
TButton: gets green, stays green but the highlight color is shown when
the mouse is over it
TLabel: is getting green and grey again, works as expected.
The label is positioned on the same form as the panel, but the button is
sitting on the green panel. If it is not but on the form the behaviour
does not change.
> Which platform?
FreeBSD 4.11, fpc-2.0.2, Lazarus SVN 8285M (0.9.11 beta)
Marc
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives