[Lazarus] More simple way to add control icons?

Zaher Dirkey parmaja at gmail.com
Wed Apr 7 18:22:28 CEST 2010


2010/4/7 Paul Ishenin <webpirat at mail.ru>:
> As result you don't need mbNone. Just use [] to indicate that no button is
> pressed.

2010/4/7 Martin <lazarus at mfriebe.de>:
> I wouldn't recommend that change. Some units define
>  const  Foo = Array [TMouseButton] of String = (list of names for values);
>
> Those will break, because the count of the enum changed.
>
> Create a set
>
> type
>  TMouseButtons = set of  TMouseButton ;
> var
>  MouseButtonPressed: TMouseButtons;
>
> MouseButtonPressed := [];
> MouseButtonPressed := [mbLeft];
> MouseButtonPressed := [mbLeft, mbRight];
>
> and so on


Oh! Thank you both very much!

I searched for this, but nothing found!

:-)

Best regards,
Kjow




More information about the Lazarus mailing list