[ Mare34 @ 16.04.2009. 20:52 ] @
Zanima me koju kontrolu mogu da koristim u win forms u .netu, a da ne bude vise prekloplenih panela, gde bi se novi preview dobijao dugmetom next? To bi bila neka forma nalik wizardu. |
[ Mare34 @ 16.04.2009. 20:52 ] @
[ AMD guy @ 17.04.2009. 00:15 ] @
Kako to mislis preview?
Ako mislis da i prve udjes u drugu radis ovako, na prvu formu dodas dugme i ovaj event Code: private void button1_Click(object sender, EventArgs e) { Form2 frm = new Form2(); frm.ShowDialog(); } Pa onda iz te forme otvaras trecu itd... Sorry ako te nisam dobro razumeo [ Mare34 @ 17.04.2009. 10:52 ] @
Da znam kako se to radi sa vise formi,
ali zanima me kako na jednoj formi da imam vise mock upa, a da ne satvlam vise formi ili tabove? Za sada sam to uradio satabovima, ali zanima me kako da uradim bez tabova, a da se u nared mock up prelazi sa next. Mogu da okacim projekat sa tabovima, ako ti nije jasno. [ AMD guy @ 17.04.2009. 11:04 ] @
[ AMD guy @ 17.04.2009. 11:07 ] @
Citat: Mare34: Zanima me koju kontrolu mogu da koristim u win forms u .netu, a da ne bude vise prekloplenih panela, gde bi se novi preview dobijao dugmetom next? To bi bila neka forma nalik wizardu. Jel mislis na onaj wizard gde klikces next, next, ... finish? [ DarkMan @ 17.04.2009. 13:49 ] @
Trazi po netu .NET Wizard kontrole ako hoces bas specijalizovane kontrole. Evo na primer:
http://www.codeproject.com/KB/miscctrl/ak_wizard.aspx http://www.codeproject.com/KB/cs/WizardDemo.aspx Na codeproject-u ih imas jos pa pogledaj sta ti odgovara: http://www.codeproject.com/info/search.aspx?artkw=Wizard+Control Ako neces te specijalizovane kontrole mozes probati sa TabControl pri cemu ces naravno sakriti onaj gornji deo gde korisnik moze sam da menja tabove a ti sam isprogramiraj promenu tabova. Evo ti i kod kojim ces sakriti tabove: Kod je preuzet sa http://dotnetrix.co.uk/tabcontrol.htm Code: using System.ComponentModel; using System.Drawing; using System.Windows.Forms; namespace Dotnetrix.Samples.CSharp { [ToolboxBitmap(typeof(System.Windows.Forms.TabControl))] public class TabControl : System.Windows.Forms.TabControl { private bool m_HideTabs = false; [DefaultValue(false)] [RefreshProperties(RefreshProperties.All)] public bool HideTabs { get{return m_HideTabs;} set { if (m_HideTabs == value) return; m_HideTabs = value; if (value == true) this.Multiline = true; this.UpdateStyles(); } } [RefreshProperties(RefreshProperties.All)] public new bool Multiline { get { if (this.HideTabs) return true; return base.Multiline; } set { if (this.HideTabs) base.Multiline = true; else base.Multiline = value; } } public override System.Drawing.Rectangle DisplayRectangle { get { if (this.HideTabs) return new Rectangle(0, 0, Width, Height); else { int tabStripHeight, itemHeight; if (this.Alignment <= TabAlignment.Bottom) itemHeight = this.ItemSize.Height; else itemHeight = this.ItemSize.Width; if (this.Appearance == TabAppearance.Normal) tabStripHeight = 5 + (itemHeight * this.RowCount); else tabStripHeight = (3 + itemHeight) * this.RowCount; switch (this.Alignment) { case TabAlignment.Bottom: return new Rectangle(4, 4, Width - 8, Height - tabStripHeight - 4); case TabAlignment.Left: return new Rectangle(tabStripHeight, 4, Width - tabStripHeight - 4, Height - 8); case TabAlignment.Right: return new Rectangle(4, 4, Width - tabStripHeight - 4, Height - 8); default: return new Rectangle(4, tabStripHeight, Width - 8, Height - tabStripHeight - 4); } } } } } } Evo i moje krace verzije gore date TabControl-e: Code: using System.ComponentModel; using System.Drawing; using System.Windows.Forms; namespace WindowsApplication1 { [ToolboxBitmap(typeof(System.Windows.Forms.TabControl))] public class TabControlEx: System.Windows.Forms.TabControl { private bool m_HideTabs = false; [DefaultValue(false)] [RefreshProperties(RefreshProperties.All)] public bool HideTabs { get { return m_HideTabs; } set { if(m_HideTabs != value) { m_HideTabs = value; if(m_HideTabs) this.Multiline = true; this.UpdateStyles(); } } } [RefreshProperties(RefreshProperties.All)] public new bool Multiline { get { return (this.HideTabs ? true : base.Multiline); } set { base.Multiline = (this.HideTabs ? true : value); } } public override System.Drawing.Rectangle DisplayRectangle { get { return (this.HideTabs ? this.ClientRectangle : base.DisplayRectangle); } } } } [ Mare34 @ 17.04.2009. 17:59 ] @
@Darkman: to je to
@AMD Guy: hvala na trudu Copyright (C) 2001-2024 by www.elitesecurity.org. All rights reserved.
|