asomer Posted January 25, 2021 Share Posted January 25, 2021 Hi, i want to deactivate a selection component (combo box or radio buttons) by following script component.ComboBox.Visible=0 It disappears when i run the script. Visibility function works fine, but it is still active. You can change the selection when you clicked on invisible component. Can you advise how I can solve this please? Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted January 25, 2021 Share Posted January 25, 2021 You probably need to set focus to another control. So, pick another control and do: component.myComponent.SetFocus() that should pull focus away from the combo/radio. Quote Link to comment Share on other sites More sharing options...
asomer Posted January 27, 2021 Author Share Posted January 27, 2021 Visibility function prevents click in button components. If button is invisible, you can't click on it. I mean combo box dissappears, but you can still click on it and change the value. Is there any way to prevent click? Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted January 27, 2021 Share Posted January 27, 2021 A couple possible workarounds: 1) put it in a group with another control and then make the group invisible 2) move the component programmatically offscreen to make it invisible, then back onscreen to make it visible. I prefer the 1st solution, especially if you are making other controls invisible at the same time. Quote Link to comment Share on other sites More sharing options...
asomer Posted January 28, 2021 Author Share Posted January 28, 2021 1st solution solved my problem. Thanks for your help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.