I would like to create a textBox (like in windows paintBrush, that u can just put on the pictureBox and write down text onto it.)
Anyway, i've create the next code:
if (e.Button.ImageIndex == 4)
Text1.Pushed = true;
assign = "Text";
// Create an instance of a TextBox control.
TextBox textBox1 = new TextBox();
// Set the Multiline property to true.
textBox1.Multiline = true;
// Add vertical scroll bars to the TextBox control.
textBox1.ScrollBars = ScrollBars.Vertical;
// Allow the RETURN key in the TextBox control.
textBox1.AcceptsReturn = true;
// Allow the TAB key to be entered in the TextBox control.
textBox1.AcceptsTab = true;
// Set WordWrap to true to allow text to wrap to the next line.
textBox1.WordWrap = true;
fontDialog1.ShowColor = true;
fontDialog1.ShowHelp = true;
fontDialog1.ShowEffects = true;
if(fontDialog1.ShowDialog() == DialogResult.OK)
textBox1.Font = fontDialog1.Font;
Which ofcourse allow me to open the fontDialog class and manipulate it.
but I also want to be able to create a textbox in order to write text inside... How is it done? (I've made a class for it bute what should I use?? Maybe its the "createGrafhics" method?) (I need to be able to drag the text box to the size I want and than to insert text)
0 · ·