Salat Posted January 2, 2003 Posted January 2, 2003 What is the diffrence between panel and picturebox? What can Panel do, which PictureBox can't? Quote profesjonalne programowanie na zlecenie :)
*Experts* Volte Posted January 3, 2003 *Experts* Posted January 3, 2003 I think Panel in VB.NET is basically what PictureBox was in VB6... I mean who really used them to display pictures? They were used as drawing surfaces, control containers, and buttons, but rarely was the PictureBox used over the Image control to display pictures. In VB.NET, the Panel, I believe, is what you use for a control container and whatnot, while the PictureBox is for displaying images (note the lack of an Image control). I'm not 100% sure which you should use for drawing on (when you're not using the form) in the case of a painting program or whatever, but I would assume the PictureBox. It probably doesn't matter much though. Quote
UCM Posted January 3, 2003 Posted January 3, 2003 Panels are pretty nifty... Panels can be used to position controls in different grids, that's 1 thing... but what comes in Reallll handy is when you want to use a spliter control... Try this: * start with a new blank form * draw a panel with half the height of the form * set this panel1.dock to "top" * draw a spliter control on the form right under the panel1 * set the spliter.dock to "top" * set the spliter to a height of about 6 pixels * draw another panel, panel2, under the spliter * set panel2.dock to "fill" * change the .backcolor of both panels to 2 different colors like yellow and blue Run the form drag the spliter up and down ;-) Nifty, int'nit? Quote UCM >-)
UCM Posted January 3, 2003 Posted January 3, 2003 addition... Forgot to mention.... try changing the .visible property of either panel to "false" it will disappear but when it goes back to visible, it's back like normal... Why is this important you ask?? try putting controls on the panel, such as a textbox and then set the textbox.dock to "fill", now the textbox is scalable. there's much more to it too Quote UCM >-)
*Experts* Nerseus Posted January 3, 2003 *Experts* Posted January 3, 2003 Also, a Panel supports automatic scrollbars. Draw a textbox really wide, say 200 pixels. Now draw a Panel, say 100 pixels wide. Drop the textbox into the Panel and turn on the AutoScroll properties. You'll see the Panel control can automatically add scrollbars and make them the right size to fit all your controls. I would not recommend doing this except in rare cases. It's not a very standard look, but can be handy if used properly. -Ner Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Salat Posted January 3, 2003 Author Posted January 3, 2003 thanks guys, I was just wondering, but now I have some new great ideas. Thanks for You of course.... Quote profesjonalne programowanie na zlecenie :)
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.