A simple question, but still no answer 
Author Message
 A simple question, but still no answer

OK, I have a panel on a form with a toobar and statusbar.
Now I want to add two scrollbars to view an image larger than the
screen. How do I cover up that little square where the scrollbars meet
in the LR? My image show through there.

Thanks, Theron Wierenga



Sat, 09 Oct 2004 08:36:58 GMT  
 A simple question, but still no answer
well you could put a disabled control on it...


Quote:
> OK, I have a panel on a form with a toobar and statusbar.
> Now I want to add two scrollbars to view an image larger than the
> screen. How do I cover up that little square where the scrollbars meet
> in the LR? My image show through there.

> Thanks, Theron Wierenga



Sat, 09 Oct 2004 08:57:27 GMT  
 A simple question, but still no answer
Set the main forms "AutoScroll" to true, change the Panel to an picturebox,
put the picturebox in the upper right corner of your form and change the
pictureboxes size mode to "AutoSize".
That is it.  No extra scrollbars needed.
Or..
As the example above shows, a Size Grip appears on the form, so if you must
keep it the way you have it, just place a size grip on the form.  To do
this, change the SizeGrip property of the form to "Show".

Jay


Quote:
> well you could put a disabled control on it...



> > OK, I have a panel on a form with a toobar and statusbar.
> > Now I want to add two scrollbars to view an image larger than the
> > screen. How do I cover up that little square where the scrollbars meet
> > in the LR? My image show through there.

> > Thanks, Theron Wierenga



Sun, 10 Oct 2004 05:59:43 GMT  
 A simple question, but still no answer
What you can do is to rely on the form scrolling functionality.

this.AutoScroll = true;            //turns forms scrlling ON
panel = new Panel();
panel.BackColor = Color.AliceBlue;
panel.Parent = this;
panel.Size = new Size(1000,1000);     //make size of the panel larger then
the form

In your case make the panel the size of the image. Scroll bars will appear
if needed and allow you to scrol panel thus scrolling the image.

Hope this helps,
Pavel Zolnikov.



Sun, 10 Oct 2004 06:09:11 GMT  
 A simple question, but still no answer
Pavel,

        OK, I can use this and get it to work.

---------------------------------------

this.AutoScroll = true;            //turns forms scrlling ON
panel = new Panel();
panel.BackColor = Color.AliceBlue;
panel.Parent = this;
panel.Size = new Size(1000,1000);     //make size of the panel larger
then
the form

In your case make the panel the size of the image. Scroll bars will
appear if needed and allow you to scrol panel thus scrolling the
image.

-----------------------------------------

Problems occur when you add a toolbar and statusbar. Scroll breaks up,
image doesn't fit right, toolbar sits at top, but statusbar attaches
to panel and scrolls. Any suggestions?

It also strikes me as strange that the form has autoscroll turned on
not panel, as in Petzold's examples. If toolbar, panel, and status all
sit on the form, I'd think you'd just want the panel moving while the
other two stay in place. I suspect this is why I can add the two
controls.

Thanks, Theron



Mon, 11 Oct 2004 05:34:29 GMT  
 A simple question, but still no answer
Hi Theron,

I think you can try to create two panels. The first one will have form as a
parent and you can resize it and position it according to your form size and
position of toolbar and status bar. The second one -inner - will have the
rirst one as a parent. Make its size equal to the size of your picture.
After you set AutoScroll property of the first, outer panel to true it
should display scrollbars just fine. I just tried this code and it looks
nice, imho :

panelPic = new Panel();
panelPic.BackColor = Color.AliceBlue;
panelPic.Parent = panelOuter;
panelOuter.AutoScroll = true;
panelPic.Size = new Size(1000,1000);

Regards,
Pavel.



Mon, 11 Oct 2004 10:31:16 GMT  
 A simple question, but still no answer
Hi Theron,

I think you can try to create two panels. The first one will have form as a
parent and you can resize it and position it according to your form size and
position of toolbar and status bar. The second one -inner - will have the
rirst one as a parent. Make its size equal to the size of your picture.
After you set AutoScroll property of the first, outer panel to true it
should display scrollbars just fine. I just tried this code and it looks
nice, imho :

panelPic = new Panel();
panelPic.BackColor = Color.AliceBlue;
panelPic.Parent = panelOuter;
panelOuter.AutoScroll = true;
panelPic.Size = new Size(1000,1000);

Regards,
Pavel.



Mon, 11 Oct 2004 10:31:04 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. simple question, pls answer\

2. Simple question ( for those how knows the answer )

3. This question must have a simple answer.

4. Help... V Simple Questions Need Answering

5. Simple Question - Please Answer -- Anyone??!!

6. simple 2 line answer socket question

7. Need answer for probably very simple question...

8. A question for a simple answer

9. Simple problem across processes - need simplest answer

10. I need some Simple C answers

11. May your your simple C answer!

12. Simple Loop answer

 

 
Powered by phpBB® Forum Software