[lazarus] CVS changes

Michal Bukovjan bukovjan at mbox.dkm.cz
Fri Sep 13 18:31:53 EDT 2002


Andrew Johnson wrote:

> On Fri, 13 Sep 2002 15:45:06 +0200
> "Michal Bukovjan" <bukovjan at mbox.dkm.cz> wrote:
>
>> Thanks to MoveWindowOrg stuff, I removed the graphic control 
>> hackaround - TSpeedButton are now drawing via proper mechanism.
>> There is only some more flickering, I wonder where this comes from.
>>
>> Please notice that upon exit, sometimes the buttons are not drawn 
>> (this happened even with workaround). Looks like when we remove some 
>> draw messages, we do not do that quite right.
>
>
> I am not sure if its your new code, or something wrong in my TextRect 
> or more problems with Clipping, but since your changes to SpeedButton 
> I have noticed bizaare behaviour with SpeedButtons on Panel's or 
> ScrollBox. The strangeness can easily be seen in TCollectionItem 
> Property Editor, for instance editing a Statusbar's Panels, when you 
> move over the add button, the Delete Button's Text is, well, clipped I 
> guess to the Rectange of the Add button. It gets even wierder. I had a 
> Form with two speedbuttons in it, and a panel with two speedbuttons on 
> IT. After moving my cursor over one of the buttons on the panel NONE 
> of the buttons were updating on Mouse over or Mouse click. This 
> doesn't apear to a problem with just Panel either, as I said, it also 
> happens with speedbutton's on Scrollbox's, for instance one button the 
> caption completely disapeared on Mouse over.. and it was the only 
> speedbutton with a caption.
>
> Like I say, I don't know if this is a problem in your code, or a 
> problem made apparent because of your code, but either way if you have 
> any ideas on this.. its getting frustrating as I never know when the 
> buttons will work or not, or when they will just act funny, and I 
> can't figure out where the problem is as of yet.
>
> Andrew
>
I noticed the problem, too, looks like clipping.
Note that what I commited is not new code, just a cleanup since 
MoveWindowOrg is now supposedly working - therefore, we get normal 
painting for TGraphicControl right now. The cleanup included removal of 
a special code (ugly hack) for TSpeedButton that was there just to make 
it work, which is redundant now, and supposedly some errors are 
therefore exposed and found.

There were drawing problems even before, now they get more transparent. 
I would expect that the problem is indeed with clipping, and possibly 
with ClientRect not being set correctly under some curcumstances. I will 
have time to look at the SpeedButton code after the weekend.

The problems do not occur on the component pallette, so perhaps they are 
related to being TPanel as parent...

And BTW, I just refixed TCollection property editor - the Listbox should 
not be multiselect (maybe later). This was yet another inadverent commit 
with my experiment (DOH!)

Michal







More information about the Lazarus mailing list