[Lazarus] Component visibility at design time

patspiper patspiper at gmail.com
Tue Apr 12 19:31:19 CEST 2011


On 04/11/2011 11:19 PM, Juha (gmail) wrote:
> patspiper kirjoitti sunnuntai, 10. huhtikuuta 2011 20:56:17:
>> The button will be visible by default. The application would show or
>> hide the button depending on the context.
>>
>> Anyway, my actual modifications to TEditBtn just add the necessary logic
>> so that a descendant that can hide/show the button becomes feasible.
> I think you mean component TCustomEditButton.
Indeed.
> Your modification could be used for a filter-edit component I planned to make
> and use for different list- and treeviews in Lazarus.
> When empty, the control shows a gray "(filter)" or "(search)".
> When user types something, an erase-button shows up. Clicking the button makes
> the control empty again.
> I wanted to draw an erase-button on the right end of the edit control itself,
> but it may be more difficult.
>
> Anyway, if you have modifications for TCustomEditButton which don't break
> existing code, I think it can be used in LCL.
I think my modifications suit your exact needs. I'll submit the patch.

Stephano




More information about the Lazarus mailing list