Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2011-04

Component visibility at design time

7 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

patspiper

I modified TEditBtn and made the button optional in order to make that component more generic. However, the button stays visible during design time no matter what its visible setting is.

Isn't it possible to hide a (sub) component in design time?

Thanks,
Stephano

Reply by email

Michael Van Canneyt
to patspiper
patspiper wrote
I modified TEditBtn and made the button optional in order to make that component more generic.

But showing the button is exactly the purpose of this control, so how can it be optional ?

Michael.

Reply by email

patspiper
to Michael Van Canneyt: But showing the button is exactly the purpose of this control, so how can it be optional ?
Michael Van Canneyt wrote 9 lines
On Sun, 10 Apr 2011, patspiper wrote: > I modified TEditBtn and made the button optional in order to make > that component more generic. But showing the button is exactly the purpose of this control, so how can it be optional ?

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.

Stephano

Reply by email

patspiper
to zeljko: TControlStyle csNoDesignVisible zeljko
zeljko wrote 8 lines
On Sunday 10 of April 2011 12:11:44 patspiper wrote: > I modified TEditBtn and made the button optional in order to make that > component more generic. However, the button stays visible during design > time no matter what its visible setting is. > > Isn't it possible to hide a (sub) component in design time? TControlStyle csNoDesignVisible

Thanks Zeljan!!

Saved me a lot of grief :-)

Stephano

Reply by email

Juha gmail
to patspiper: The button will be visible by default. The application would show or hide the button…

patspiper kirjoitti sunnuntai, 10. huhtikuuta 2011 20:56:17:

Show quoted text 5 lines
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.

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.

Juha

Reply by email

patspiper
to Juha gmail
Juha wrote 7 lines
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.

Show quoted text 10 lines
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

Reply by email