Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8788901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:15:19+00:00 2026-06-13T22:15:19+00:00

OK, I fix everything, now is exactly what I want. I have a textBox1

  • 0

OK, I fix everything, now is exactly what I want.
I have a textBox1, panel1, and drawTexta (a button).

When I click the button and choose a point in the panel, I want to draw the string from the textBox1.

private void panel1_Paint(object sender, PaintEventArgs e)
{
    using (SolidBrush br = new SolidBrush(Color.Red))
    {
        StringFormat sf = new StringFormat();
        sf.FormatFlags = StringFormatFlags.DirectionRightToLeft;
        e.Graphics.DrawString(textBox1.Text, this.Font, br, point1, sf);
    }
}

private void panel1_MouseDown(object sender, MouseEventArgs e)
{
    point1 = new Point(e.X, e.Y);
} 

bool flag = false;
Point point1 = new Point();

private void drawTexta_Click(object sender, EventArgs e)
{ 
    flag = true;
    panel1.Refresh();
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T22:15:22+00:00Added an answer on June 13, 2026 at 10:15 pm

    The text isn’t being drawn to panel1 because you need to refresh it.

    Add this code to button1_Click, after you set drawText to true:

    panel1.Refresh();
    

    That will make the static text show up.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have a GridView scrolling vertically, and everything works fine. But now that
I can run normally SQLAlchemy when everything is in one file. I now want
Now I have to fix some bugs in MVC.Asp.Net project. In projec i have
I have a snip of code that I cannot seem to fix. Everything works
I manually applied this patch and everything works now. Waiting on upstream to fix
To fix the UITextview blue color issue for links in ios ( i want
I have to fix a glitch with this code someone wrote but I'm not
I can't fix this problem on my listview template: i have the error as
I've been trying to work this out for 2 days now and I have
I have set up a few rules based on other questions but now my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.