Home › Forums › Konopka Signature VCL Controls (formerly Raize Components) › Problem on TRzPanel.Enabled
Tagged: TRzPanel
- This topic has 5 replies, 2 voices, and was last updated 2024-02-05 at 5:31 am by Andy Dai.
-
AuthorPosts
-
-
February 4, 2024 at 1:44 am #3836
Hi,
When Change TRzPanel.Enabled, if component in TPzPanel, then component.enabled will auto relation TRzPanel.Enabled.
how to disable relation ?
Thanks
-
February 4, 2024 at 11:18 pm #3837
Hi,
I’m not sure I completely understand your question. Let me try to rephrase what I think you are asking. Consider a TRzPanel component on a form and inside that panel are other controls such as a TRzButton or TRzEdit. Then when you set the Enabled property of the TRzPanel to False, the Enabled property of the button and edit are also changed to False. And you are asking if that behavior can be disabled? Is that correct?This behavior is by design and cannot be changed without modifying the source code of the component. The reason the TRzPanel operates in this manner is because if you set up the form in the same way but use a TPanel instead of a TRzPanel, when you disable the panel, the button and edit inside the panel do not allow any user interaction, but the controls still appears as though they do allow interaction.
Also note that the TRzPanel also keeps track if any its controls are already disabled when the panel is disabled. And then when the panel is re-enabled, those originally disabled controls remain disabled.
Ray
-
February 5, 2024 at 3:56 am #3838
Hi,
“And then when the panel is re-enabled, those originally disabled controls remain disabled.”
After i try, when panel is re-enabled, all controls in Panel will auto Enabled.
Thanks
-
February 5, 2024 at 4:14 am #3839
Hi,
“And then when the panel is re-enabled, those originally disabled controls remain disabled.”
After i try, when panel is re-enabled, all controls whose original state is disable in RzPanel will auto Enabled.
Thanks.
-
-
February 5, 2024 at 4:24 am #3840
try
RzPanel1.Enabled:=False;
RzButton1.Enabled:=False;
Button1.Enabled:=False;
finally
RzPanel1.Enabled:=True;
// RzButton1.Enabled and Button1.Enabled automatic become True
end;But if
try
RzButton1.Enabled:=False;
Button1.Enabled:=False;
RzPanel1.Enabled:=False;
finally
RzPanel1.Enabled:=True;
// RzButton1.Enabled and Button1.Enabled Still False
end; -
February 5, 2024 at 5:31 am #3841
i see now,
after RzPanel.Enable:=False , if change enable of controls will not working,
RzPanel Re-Enable will recovery statu of controls.
-
-
AuthorPosts
- You must be logged in to reply to this topic.