idokan at gmail.com
Tue Sep 4 22:04:38 CEST 2012
On Tue, Sep 4, 2012 at 10:58 PM, patspiper <patspiper at gmail.com> wrote:
> On 04/09/12 22:51, ik wrote:
>> I'm trying to do the following code:
>> for i := 0 to vispan.ComponentCount -1 do
>> if vispan.Components[i] is TSpeedButton then
>> if Assigned(TSpeedButton(vispan.Components[i]).Action) then
>> TAction(TSpeedButton(vispan.Components[i]).Action).Enabled :=
>> TSpeedButton(vispan.Components[i]).Enabled := True;
>> where vispan is a TPanel that get the current visible panel.
>> However, it seems that ComponentCount is 0, even though it has 7
>> components inside.
>> The components does see the TPanel as it's parent, and so does the
>> Is it a bug, or am I missing something here ?
>> Lazarus 1.1 r38512M FPC 2.6.0 x86_64-linux-gtk 2
> Probably the form is the owner and not the panel.
The panel is the parent. I wrote the following code:
ShowMessage('btnReloadQuotes.parent: ' + btnReloadQuotes.Parent.Name);
it does claim that the parent is the panel.
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
More information about the Lazarus