C#

Moderators: None (Apply to moderate this forum)
Number of threads: 2720
Number of posts: 5746

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Problem with textBox Posted by Schwarzenegger on 14 Mar 2006 at 4:38 AM
Hello everyone:
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();
textBox1.
// 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)

Sincerly yours,

Rotem.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.