Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

OLE Control

I have an OLE control added to a form I'm working on and I have it set to visible. When I run the form in OpenInsight 9.4 the OLE Control still isn't visible even after setting the background color, looking to add other controls such as combo boxes and static texts from a stored procedure. Anyone know why this may be happening?

Comments

  • Is the OLE control you added to the form specifically the SRP Panel control?
  • I was trying to originally but right now I have an OLE Control from the Tool box in the Form Designer and I'm not able to see it when I'm running. My main goal is to be able to add controls onto the form by a click of a button when its running and from what I read it looks like an OLE control is the way to go however if that's not the case please let me know. I'm fairly new to OpenInsight and SRP controls. Thanks!
  • I appreciate the explanation of what you are attempting to do. There are a few things that we need to go over. Some of this might be already known to you, but since you said you were new to OpenInsight, I am going to err on the side of caution.

    Whenever you place the OLE control onto a form in the Form Designer tool, it will always appear invisible. This is because OI does not draw anything on the control. Thus, it can be hard to see unless you enabled the Border property (which you can do via the Properties dialog). I like to do this until I actually set the Prog ID of the 3rd party ActiveX control. Regardless, always remove the Border property before testing and deploying.

    If you are new to OpenInsight, you might not have read any of the documentation on using OLE controls with OpenInsight. There is the documentation that Revelation provides, but you might also find our own Using OLE in OpenInsight whitepaper of use. It's an old paper, but still valid.

    Assuming you have a basic understanding of the above, you will know that you have to put a Prog ID of the 3rd party ActiveX control in the Text property for the OLE control. The Prog ID for the SRP Panel control is SRP.Panel.1. Now, the SRP Panel control will not draw anything in the OLE control at design time, so it will still appear invisible. You can confirm that the SRP Panel control is being referenced correctly by double-clicking on the OLE control itself to bring up the Properties dialog. You will see the Ole Property grid at the bottom. It should list properties such as ActiveFrom, Background, Border, etc. You can enter a color in the Background property value here and this will show up in the Form Designer. Setting the Form Designer background color for OLE controls will never do anything.

    If you get this far, then you have everything you need to begin writing the code that will add controls to your from at runtime.
  • Awesome sounds good that makes sense, and yes I've been reading a lot of he documentation on it and trying to get a better grasp of it. I may need to try out some of the settings in that link to get it to work because the properties dialog is usually blank when I create the OLE control and doesn't let me add or set properties. I'll also try adding the SRP.Panel.1 to the name, haven't tried that yet and as for the background color I was trying it via the Set_Property function just to be able to see it really. Thanks a million!
  • I applaud your tenacity to work through this. I think, however, you would greatly benefit from some training. If you are new to OpenInsight, there is a lot of ground that can be covered with formal or informal training. We are an ATC (authorized training center) and can provide help in this area.
  • Thank you much appreciated!! And yes I've completed the entire OpenInsight 10 training course which cleared up a lot. Will be working with OI10 very soon once we have it all set up, for now I've been using OI 9.4 so I've been watching tutorial videos for that version as well for the time being. Learning more every day the more I use it so I'd say I've made some progress.
Sign In or Register to comment.