Merhaba, bir sorunum var. Aşağıdaki resimlerde de görüldüğü üzere bir sekmeler kısmı var. Kapat tuşuna basıldığında sağındaki sekmelerin kayması lazım. Ama tam olarak yapamadım. Aşağıdaki resimde kapat tuşuna basınca sağındaki sekmeleri kaydırmak yerine siliyor. Nerde hata yaptığımı bulamadım. Yardımcı olabilir misiniz ?
[CODE lang="csharp" title="kod"]yenisekme_kapat.Click += delegate
{
yenisekme.Visible = false;
yenisekme.Enabled = false;
int x = Array.IndexOf(pics, yenisekme);
int z = 0;
int sayac = 0;
if (pics[x + 1] == null && pics[0] == null)
{
this.Close();
}
else
{
foreach (PictureBox ixtem in pics)
{
if (ixtem!=null)
{
sayac++;
}
}
for (int i = 1; i < sayac-x; i++)
{
if (pics[x + i] != null)
{
pics[x + i].Location = new Point(pics[x + z].Location.X, pics[x + z].Location.Y);
}
else
{
}
z++;
}
}
pics[x] = null;
MoveFront(pics);//null dizinin sonuna
foreach (PictureBox ixtem in pics)
{
if (ixtem!=null)
{
yeni_sekme_acma_butonu.Location = new Point(ixtem.Location.X + ixtem.Width + 6, yeni_sekme_acma_butonu.Location.Y);
}
}
};[/CODE]
[CODE lang="csharp" title="kod"]yenisekme_kapat.Click += delegate
{
yenisekme.Visible = false;
yenisekme.Enabled = false;
int x = Array.IndexOf(pics, yenisekme);
int z = 0;
int sayac = 0;
if (pics[x + 1] == null && pics[0] == null)
{
this.Close();
}
else
{
foreach (PictureBox ixtem in pics)
{
if (ixtem!=null)
{
sayac++;
}
}
for (int i = 1; i < sayac-x; i++)
{
if (pics[x + i] != null)
{
pics[x + i].Location = new Point(pics[x + z].Location.X, pics[x + z].Location.Y);
}
else
{
}
z++;
}
}
pics[x] = null;
MoveFront(pics);//null dizinin sonuna
foreach (PictureBox ixtem in pics)
{
if (ixtem!=null)
{
yeni_sekme_acma_butonu.Location = new Point(ixtem.Location.X + ixtem.Width + 6, yeni_sekme_acma_butonu.Location.Y);
}
}
};[/CODE]
Son düzenleyen: Moderatör: