Scroll an image within a container in a form
Scroll an image within a container in a form
(OP)
Dear all,
I have searched for any existing discussions with suggestions and solutions but couldn't find a suitable one!
I have a form with a container. Inside the container I have an image control. I used 'Isometric' in the Stretch method and it shows in the image control as follows:

As you can see, it's a bill output from a slip printer, length is much more than width.
What would be the best way to add a feature that the image is filled in the image control horizontally (ie full width) and I can scroll vertically to see the hidden part of the image?
I have searched for any existing discussions with suggestions and solutions but couldn't find a suitable one!
I have a form with a container. Inside the container I have an image control. I used 'Isometric' in the Stretch method and it shows in the image control as follows:

As you can see, it's a bill output from a slip printer, length is much more than width.
What would be the best way to add a feature that the image is filled in the image control horizontally (ie full width) and I can scroll vertically to see the hidden part of the image?
Rajesh
RE: Scroll an image within a container in a form
RE: Scroll an image within a container in a form
Take a look at my article: Create a scrolling region within a form.
Does the example shown in the article meet you requirement?
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
Visual FoxPro articles, tips and downloads
RE: Scroll an image within a container in a form
The only concern is with the 'Modal/Modeless' I think.
Let me check.
Rajesh
RE: Scroll an image within a container in a form
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
Visual FoxPro articles, tips and downloads
RE: Scroll an image within a container in a form
Scrollable container...
https://www.levelextreme.com/Home/ShowHeader?Activ...
https://ctl32.blogspot.com/p/ctl32-scrollableconta...
http://yousfi.over-blog.com/2017/11/scrolling-cont...
https://www.tek-tips.com/viewthread.cfm?qid=170354...
https://github.com/MJindrova/ViewPort
mJindrova
RE: Scroll an image within a container in a form
why would modality be a concern?
Your main form is full screen, isn't it? Why do you need that to be modal at all? It should be a top level form and then it can't even be modal anyway. So the scrollable region done with a form positioned on your main form shouldn't be a problem. If it is, you just should fix your main form to be non modal, because it shouldn't be modal anyway.
Chriss
RE: Scroll an image within a container in a form
Yes, Chriss (Mike too).
I was thinking that way. My main screen is not modal and so I can use mike's idea I think.
Anyway, I am checking other options as well as given by mJindrova.
Rajesh
RE: Scroll an image within a container in a form
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
Visual FoxPro articles, tips and downloads
RE: Scroll an image within a container in a form
Last time it was https://github.com/calloatti/LIBCURL in the thread184-1827290: Problem with HTTP response
Chriss
RE: Scroll an image within a container in a form
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
Visual FoxPro articles, tips and downloads
RE: Scroll an image within a container in a form
RE: Scroll an image within a container in a form
I am trying to use one of these.
1. The 2nd link has a well explained content but I do not see any link to download the files, VCX etc !!!
2. I tried to use the ViewPort (I assume it's your own product!). I was able to incorporate it to my own form. But I have problems with the sizing of the container. In my form's INIT, I have resized, repositioned the _vp_viewport. But, when I run, it resizes to the edges of my form. Please see below pics for a visualisation.
My generalised form:
When I run it, the viewport overlaps my "Close" button by filling the height upto the bottom of my form!
I see properties like, "nSizeDeltaRight", "nSizeDeltaBottom", "minleft", "mintop", "maxHeight", "maxWidth" etc. I played with it after comparing and assuming its purposes but not yet got it to work properly the way I need.
Do you have a document, explaining the correct use of these properties?
Rajesh
RE: Scroll an image within a container in a form
the ctl32 blog mirror site has the download page at https://ctl32.blogspot.com/p/ctl32-downloads.html and that zip download contains everything.
Chriss
RE: Scroll an image within a container in a form
Using ctl32 to Create a MoreModern UI
The scrolling container info start at about page 15.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
Visual FoxPro articles, tips and downloads
RE: Scroll an image within a container in a form
Please, can you upload your form (must be run able)?
mJindrova
RE: Scroll an image within a container in a form
Thanks. I downloaded and tried the SContainer and it's working!
However, there is a left and top border line appearing with the image even though I have set the borderStyle to none for the Image control (see pic). Need to check that.
Also, as you had mentioned a few days back, I will have to check the scenario where there are multiple pages in the report output.
Rajesh
RE: Scroll an image within a container in a form
I got it working.
The ctl32 download set has almost the same documentation for S-Container.
Thanks
Rajesh
RE: Scroll an image within a container in a form
I think, I will have to modify many places and hard code many values in order to make it runnable.
Let me check. Will let you know.
Rajesh
RE: Scroll an image within a container in a form
You're thinking this has to come from tl32, but I see borders in the screenshot you initially posted. A line can have many sources, a container has a border, you could have a line in the image itself..., you should find that out yourself. In the sample form I don't see a line generated, the scrollbars are slightly off an ideal position, but that's a different problem.
Chriss