×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Scroll an image within a container in a form
3

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?


Rajesh

RE: Scroll an image within a container in a form

Yourform.ScrollBars = 2

RE: Scroll an image within a container in a form

(OP)
Mike,

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


Rajesh

RE: Scroll an image within a container in a form

Rajesh, yes, I'm afraid the restriction on modal forms could be an issue. I don't know any way round that. The other restrictions I mentioned in the article are less serious.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: Scroll an image within a container in a form

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

RE: Scroll an image within a container in a form

(OP)
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

RE: Scroll an image within a container in a form

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

RE: Scroll an image within a container in a form

You're right, Chris. I had forgotten Carlos' stuff on GitHub. Thanks.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: Scroll an image within a container in a form

Hey, guys, Carlo´s GitHub, I look him, and don´t have Scrollbar and others (TDI), but I have all of them.

RE: Scroll an image within a container in a form

(OP)
Hi Martina,

Quote (Martina)


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

Rajesh,

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

mJindrova

RE: Scroll an image within a container in a form

(OP)
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.



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

(OP)
Mike,

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

(OP)
Martina,

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


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

Quote (Rajesh)

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close