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

How does the vertical scroll bar of the MDI control work?

edited July 21 in OpenInsight
Some of our users have started working from home on small laptop screens, and our app is too big for their screens. Our app is contained within an MDI control, so technically they can manually scroll the vertical scroll bar of the MDI control to see everything, but it would be better if the mouswheel did it.

While I could qualify the mousewheel event and manually move the vertical scrollbar of the MDI control, this seems wrong to me, as I would except the "framework" to handle this for me. Am I wrong in assuming that the framework does this for you, meaning that I need to do it myself?

Comments

  • edited July 21
    Edit:

    i just found out that you can actually scroll a window itself using this code, which is interesting, as this could be another way to solve this issue

    result = Send_Message(@window, "SCROLL", 0, -100)

    This means you could make an OI form into a webpage.
  • edited July 21
    edit:

    I can also see that you actually need to set the size property for each window to "move them into view", which is worrying as I don't trust the size property(as it can make invisible controls visible).
  • Josh - I see that you've crossposted this question in the WORKS forum and that you are getting help from Bob Carten. I doubt you'll get anything more useful here. I'd like to respond to a couple of other items from the above posts.
    This means you could make an OI form into a webpage.

    Yes and no. If you are only referring to an MDI Frame, then you can get a scrolling effect similar to a web page, but I still don't think the UX will be great. If you are referring to a regular OI form, then this won't behave as you might want because the scrollbar changes pages rather than navigates virtual space. This is why we created the SRP Panel control. That said, our control does not support mousewheel activity so I'm not suggesting it will completely solve your problems.
    I don't trust the size property(as it can make invisible controls visible).

    Are you aware that the SIZE property has a 5th value specifically to control how visibility is affected?

  • If you are referring to a regular OI form, then this won't behave as you might want because the scrollbar changes pages rather than navigates virtual space.


    You could add a vertical scroll bar control to the form though.

    Are you aware that the SIZE property has a 5th value specifically to control how visibility is affected?


    Thank you I will have a look.
  • You could add a vertical scroll bar control to the form though.


    True, but what would you do with that? Would you reposition the controls on the form dynamically as the value of the scrollbar was changed?
  • edited July 22
    You don't need to reposition the controls. And the vertical scrollbar doesn't do anything. It's just a UX thing so the user knows the form is scrollable.

    If you create a really big form and then place controls on that form (in the normal static way), you can scroll down to see the controls that would otherwise be "off the screen".

    The only problem is that the GUI designer doesn't really let you work with a big form. You can only make a form that is as big as your screen...which doesn't give you a lot of space to wok with.

    Anyway, I have gotten the mdi thing working, so that will do.

    And yes, i would use your panel control, but it's too late. We need a solution that works for our hundreds of existing forms.
  • I'm glad you have a working solution. However, for the sake of clarity in case others are reading, your comment about scrolling "down to see the controls that would otherwise be 'off the screen'" is not accurate. The scrollbar control itself won't do anything automatically, as I am sure you know, so you would have to programmatically do something to create the "web page" effect. The scrollbar that naturally appears on the form when it is multipaged won't help either for obvious reasons.

    I agree that the Form Designer is rather limiting in this area. You can put controls "off the screen", although it is challenging if you can't see what you are doing. Nevertheless, bringing them "onto the screen" is something that you can't do unless you use the SIZE property to reposition them or - as I mentioned earlier - use our SRP Panel control so you can have a true scrollable background where the controls move up and down automatically like a web page.
  • You don't need the size property as far as I can see.

    result = Send_Message(@window, "SCROLL", 0, -10)

    The above code will scroll down, revealing stuff that was previously off the screen.
  • Well, I learned something new here. I've always assumed that the SCROLL method did the same thing as the VPOSITION property. I was wrong. However...it appears that that while the SCROLL method does reposition the virtual space of the form, it actually doesn't do anything with the native scrollbar. I now understand why you were suggesting you could put a Vertical Scroll Bar control on the form and then just programmatically call the SCROLL method. Yeah, that would work...but it makes it all the more a shame that we can't easily put controls beyond the confined edges of the form.
  • I think there could be a way to do it using multiple monitors, but still awkward.
Sign In or Register to comment.