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

Tab order, z-order, and the picture control

I am asking for help in two areas.

1. I want to be able to put controls on top of an SRP Picture Control. Much like using it as a Group Box, and have the Picture Control never get focus. This is my main goal.

What are the basic steps for doing this?

In the process of trying to figure out how to do that I got all confused with OI and Z-Order or what is on top of what.

2. Understand how OI establishes Z-Order.

Can someone explain how Tab order in the form designer affects Z-Order if at all?
Does the order in which you set properties of Controls effect Z-Order?

I am aware of SET_ZORDER but it seems that no matter what I do something is giving the Picture Control focus or puts it on top of everything else.

Thanks

Comments

  • 1. TBH, can't be done. Nature of the beast with OLE controls in OI. What is your functional goal here? That is, why do you want to do this?

    2. I don't believe there is any official information about this, but I believe tab order and z-order are related.
  • 1. I guess I don't want to anymore lol. My goal was to use an image behind a button to add a shadow type of effect to it (more complex than just a shadow). But wouldn't affect the size of the button so when hovered over it only the button (not the shadow area) would get a border around it. I can do it a different way with making a more complex image and using frames instead. This method will just take a lot longer on the graphics side.

    2. I guess this becomes irrelevant if you can't layer OLE controls. Might be why I couldn't really find any info on it or get to work.

    As always thanks for taking the time Don
  • You can't layer ANY controls other than Group Boxes and Tabs. OI uses the standard Win32 API to render forms, and z-order is functionally not a thing. The controls are rendered in a certain order, but when two controls overlap, they flicker back and forth. The only reason the Tab and Group Boxes work is because they are programmed to fake it with smoke and mirrors.
  • What Kevin wrote is true, but YMMV when it comes to layering non-OLE controls. Again, smoke and mirrors, but we've been able to put an OI button on top of an OI edittable control before we wrote our own control.
  • Am I correct in assuming that I can't layer pictures within a picture control either?
    For example, have one as a background and then a smaller one in the foreground.

    Are there plans to support SVG image formats?
  • The SRP Picture Control only supports one image at a time and they cannot be stacked. Depending on the background, there are other options. The SRP Tab Control with no tabs can be used as a colorful background to any controls.

    The only vector file format we support is WMF or EMF. Supporting SVG isn't as simple as just loading it into memory since it is actually a set of drawing instructions.
  • Thanks again for bearing with me. Now that I have a better understanding of what I can and can't do it makes it easier to move forward. No more fighting with z-order and tab order. :)
  • Brian, a bit of friendly advice when it comes to questions related to software design issues is to provide us a brief description of what you are trying to accomplish. You are relatively new to OI, but even veteran developers ask questions (here and on the Revelation Forum) about how to do something specific only later to discover that their end goal was impossible or best handled a different way.
  • Don, thank you for the advice and I will do my best to keep my pride out of the way. (:
    After 10 years in an industry that mocked you for your ignorance you tend to be more cautious. But that is a conversation for elsewhere.

    Sorta Back on topic
    This is more or less where I am headed, I know it will change as I get closer.


    I was trying to avoid making larger multi frame images if I didn't need to. I know it can't be done the way I was trying.

    What I was trying to do was put the Blue Glow in the background with a PictureControl and then a ButtonControl on top of that. The Button had a small image in it and then a CaptionList . Then I was going to do the rest of the effects with the button control. In the picture "Work Orders" would be the one with focus.

    Is there another way to do this or is my best bet multi frame images?
  • You can do this entirely with the button. The Background property lets you set an image for each button state. That should take care of the glowing border. Then you would use IconList and CaptionList to set the contents.
  • Thanks, Kevin that will save a lot of work. I never even thought of using multiple images in the background of the button as the examples where all with color fills so that is where my mind got stuck. Although I could do the glow with a color fill. Well, now I feel stupid. lol

    Don your point has been made :) for now on I will make sure to give more detail of my end goal.
  • Kevin, how do you set an image for a background state?
    I have tried this and I just get a black box.
    Background = "" Background<1> = "D:\Brian\Revsoft\OInsight\BMPS\RW\WelcomButtonStates\BT_Rest.png" Set_Property(CtrlEntId, "OLE.Background", Background)
  • Oh, wow! You'd think I would pay attention to my own tools. Background does not accept images after all, only Color Fill. You can get close to the effect you want using Color Fill, albeit minus the outer glow.

    Buttons do allow you to use an image, but you have to set the Style to "Custom" and then the Icon property image will be used for ALL states of the button. So, it's not ideal.
Sign In or Register to comment.