SRP Button Control
Welcome to the SRP Forum! Please refer to the
SRP Forum FAQ post
if you have any questions regarding how the forum works.
Visibl Button Control
SRP Button Control
Is there a property that can be set to programmatically make the SRP button control visible vs non-visible?
The OI VISIBLE property doesn't see to work and I haven't seen it in the Help.
The OI VISIBLE property is the way to accomplish this. So we need to look at your code to figure out why it isn't working. Are you are putting "OLE." in front of the property name? If so, then just remember that when using OI properties these should be used exactly as you would normally. Thus, when using the VISIBLE property you aren't making the ActiveX control itself invisible but the underlying OLE control that the From Designer provides to contain the ActiveX control.
My issue started when I used the Button Control on a two tab OI Form. The button controls are on the first tab surrounded by a Group Control. All is well with the button controls and functionality. When I click on tab2 the controls on this tab display but so do all of my SRP Control Buttons form tab 1. I checked and the 'All Pages' property on each button is not checked. The first issue is why are the controls displaying on tab 2? So I tried to make the controls not visible and that didn't work. Although when I am on tab 1 and I programatically make the button controls visible and no visible it works. I then forced the Group control to be invisible when clicking on tab 2 and that worked. The buttons are no longer visible on tab 2. Yet when I return to tab 1 and make the group control visible the buttons are not visible. Is there a Button Control Property that may control this?
I don't quite understand what is meant by ...that may control this. Near as I can tell, the problem you are experiencing is not directly related to the SRP Button Control. This looks more like a general OI problem. Are you sure this isn't a problem with the way you are managing GroupBox controls, since their properties get transferred onto their children?
To quickly prove (or disprove) the point, try added a regular OI button control among the SRP Button Controls. Make sure the "All Pages" property is set the same. Also make sure it is included in the same GroupBox control. Then test the form. Do you see the OI button control along with the SRP Button Controls when you don't expect to?
There is no Button property for controlling this because all our OLE controls rely on OI to handle visibility and page management. Have you looked into the possibility that you have copies of the button on both page 1 and page 2? That would explain why the property doesn't work on the page 2 copies.
The buttons had setproperty(ctrl,'PAGELIST'-1) set indicating it to appear on all pages. Once removed the issue was resolved.