3
I need to create a Panel
in a Form
Getting kind of like this:
When you click the mouse on Form
create the Panel
taking the location of the click and create the Panel
centralized.
I did so:
Panel panel = new Panel();
private void criarLabel()
{
panel.Size = new System.Drawing.Size(200, 100);
panel.Visible = true;
this.grid.Controls.Add(panel);
}
private void grid_CellClick(object sender, DataGridViewCellEventArgs e)
{
criarLabel();
}
Have you ever tried to do anything?
– Jéf Bueno
I can create the Panel.
– Tozzi
I just can’t center it on the Click site. My panel has a fixed height
– Tozzi
It’s just that I think you missed some part of your question. Come on, you want to click on an area of the screen and create a panel that has the "center" in the part that the user clicked, right?
– Jéf Bueno
It has how to put the code you have so far?
– PauloHDSousa
I edited the question.
– Tozzi
That’s right @jbueno..
– Tozzi
I liked the question, just think she could be better written, anyway +1.
– Jéf Bueno
@jbueno can change the question to make it better written!
– Tozzi
Did you make it? @Lilloh
– Jéf Bueno