[Lazarus] Ann: TButtonEdit as replacement for TEditButton

Bart bartjunk64 at gmail.com
Sun Apr 6 19:42:49 CEST 2014


On 4/6/14, Vojtěch Čihák <vojtech.cihak at atlas.cz> wrote:

> I have some notes.
>
> The main is that messages (like WMLButton etc.) does not work. This may in
> theory break other peoples' code.

Not sure if that can be fixed.
The old design was a poor one and had to be fixed in a way similar to
the current one where the edit and the button are part of the
container.


> The second is that default AutoSize was changed to False and initial height
> is hardcoded to 23 (but on my Qt are edits 21 pixel high so it's not
> consistent). I would keep AutoSIze = True as initial.

Hmm... It uses same numbers as (hardcode?) in TCustomEdit for height.
Autosize needs to be true. I'll fix that. (It was false by default
because it didn't work as expected in a previous commit).


> The third is that it's derived from TCustomControl. Since the only
> difference to TWinControl that I see here is the Canvas, which is useless
> here, I would derive from TWinControl.

Done that in a previous version, but IIRC it then looked different
(ugly), so I changed it back to TCustomControl.

Bart




More information about the Lazarus mailing list