Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scroll an image within a container in a form 3

Status
Not open for further replies.

Rajesh Karunakaran

Programmer
Sep 29, 2016
535
0
16
MU
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:

screenshot_wbiyiv.png


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
 
Mike,

The only concern is with the 'Modal/Modeless' I think.
Let me check.



Rajesh
 
Rajesh,

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
 
Chriss,

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
 
Martina, I noticed one of the sites you linked to was a mirror of Carlos Alloatti's Ctrl32. Thanks for that. When the original site closed down, I thought that the class library was lost. I'm pleased to see that it is still available.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Hey, guys, Carlo´s GitHub, I look him, and don´t have Scrollbar and others (TDI), but I have all of them.
 
Hi Martina,

Martina said:

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:

invview1_tkvf4y.png


When I run it, the viewport overlaps my "Close" button by filling the height upto the bottom of my form!

invview2_v4hauv.png


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
 
Rajesh,

Please, can you upload your form (must be run able)?



mJindrova
 
Chriss,

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.

invview3_x5vgoi.png


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
 
Mike,

I got it working.
The ctl32 download set has almost the same documentation for S-Container.
Thanks



Rajesh
 
Martina,


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
 
Rajesh said:
I have set the borderStyle to none for the Image control

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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top