How can I declare instance of PrintDocument class at run-time???
6 replies to this topic
#1
Posted 28 April 2011 - 03:00 PM
|
|
|
#2
Posted 28 April 2011 - 03:06 PM
Just like you would for any other class.
PrintDocument myPrintDocument = new PrintDocument();
#3
Posted 28 April 2011 - 03:22 PM
that's at design time
#4
Posted 28 April 2011 - 10:25 PM
sudo rm -rf /
#5
Posted 29 April 2011 - 04:10 AM
the best example for what i mean is when you have a 2 buttons on your form with click on first button you have 4 radio buttons and when you click on second button you have 6 radio buttons
#6
Posted 30 April 2011 - 06:00 PM
well, in your example of adding controls to a form, you don't need to design them persay.. one option is to do something like this
then on the button click...
List<Control> controls = new List<Control>();
then on the button click...
RadioButton rbn = new RadioButton(); rbn.Text = "some text"; //set other properties controls.Add(rbn); this.Controls.Add(rbn); //this as in reference to the form rbn.Top = top_location; rbn.Left = left_location;
#7
Posted 01 May 2011 - 04:01 AM
tnx a lot
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









