Forum » Programiranje » [visual C#] Kako določim, da mi riše na tabPage2?
[visual C#] Kako določim, da mi riše na tabPage2?
Beezgetz ::
Živjo!
Rad bi, da črte in pravokotnike rišem na tabPage2. Kako to določim?
Zdaj mi
protected override void OnPaint(PaintEventArgs pe)
{
Graphics g = pe.Graphics;
Pen myPen = new Pen(Color.Blue, 2);
g.DrawLine(myPen, 10, 10, 210, 210);
myPen.Dispose();
}
izriše na formo pod TabPage-i.
Hvala, Beezgetz.
Rad bi, da črte in pravokotnike rišem na tabPage2. Kako to določim?
Zdaj mi
protected override void OnPaint(PaintEventArgs pe)
{
Graphics g = pe.Graphics;
Pen myPen = new Pen(Color.Blue, 2);
g.DrawLine(myPen, 10, 10, 210, 210);
myPen.Dispose();
}
izriše na formo pod TabPage-i.
Hvala, Beezgetz.
Beezgetz ::
heh spet se pogovarjam sam s sabo..
public partial class Form1 : Form {
public Form1() {
InitializeComponent();
tabControl1.TabPages[1].Paint += PaintTab2;
}
private void PaintTab2(object sender, PaintEventArgs e) {
TabPage page = tabControl1.TabPages[1];
e.Graphics.DrawLine(Pens.Black, 0, 0, page.ClientSize.Width, page.ClientSize.Height);
}
by nobugs/msdn
no, pri meni dela
Lep pozdrav, Beezgetz
public partial class Form1 : Form {
public Form1() {
InitializeComponent();
tabControl1.TabPages[1].Paint += PaintTab2;
}
private void PaintTab2(object sender, PaintEventArgs e) {
TabPage page = tabControl1.TabPages[1];
e.Graphics.DrawLine(Pens.Black, 0, 0, page.ClientSize.Width, page.ClientSize.Height);
}
by nobugs/msdn
no, pri meni dela
Lep pozdrav, Beezgetz
Vredno ogleda ...
Tema | Ogledi | Zadnje sporočilo | |
---|---|---|---|
Tema | Ogledi | Zadnje sporočilo | |
» | c# formOddelek: Programiranje | 1878 (1392) | FuI2cY |
» | [c#] ukaz radirkaOddelek: Programiranje | 1120 (913) | japol |
» | [c#] picturebox, slika na slikoOddelek: Programiranje | 1089 (899) | japol |
» | [C#]Analogna uraOddelek: Programiranje | 2750 (2387) | cekr |
» | [c#]4 v vrsto - padanje krogovOddelek: Programiranje | 1998 (1830) | VASkO |