0

C++/CLI @ runtime add a PictureBox to a tab control, I need to do this at run-time because they're to represent some data the user must be able to manipulate. I actually need them to be in some kind of scrollable panel on the tabcontrol. Any ideas?

2
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by jonsca
1

Declare a picture box, set it's coordinates and background image (and the background image layout). Once that's all done, use the .Add() method of the tab control to place it on the form (I think the default is visible, so you don't have to set that before adding it). See if that works, otherwise I'll put together an example to refresh my memory.

0

I appreciate the response, but I need to wait until tomorrow to give it a try--which I will, and I'll post the result.

1

You have to add it to the tabPage of the tabControl directly. I hid the PB until I repositioned it to where it belongs. Other than that, what I replied with before should do the trick.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.