类似于outlook,应该如何实现这样的功能,是使用panel吗?还是有其它办法,谢谢~!

解决方案 »

  1.   

    http://www.ieforex.com/1/DevComponents.DotNetBar.Suite.v4.7.rar
    这个里面有这样的控件好象是sideBar,自己看下
      

  2.   

    右边使用一个Panel控件动态加载窗体文件如:
    Form2 f2=new Form2();
    f2.TopLevel =false; //这句是关键
    f2.Show();
    this.Panel1.Controls.Add(f2);
      

  3.   

    qiezic(笨鸟)  谢谢您提供的控件,类似的控件我也有一些。没有打开窗口的例子。只是有获取用户所点击的item。但要如何根据用户的选择打开不同的窗体呢?
      

  4.   

    /// <summary>
    /// Set which panel view
    /// </summary>
    /// <param name="strType"></param>
    private void SetPageView(pageType strType)
    {
    // Set all panel visible false
    pnlList.Visible = false;
    pnlCCExchg.Visible = false;
    pnlChgSch.Visible = false;
    pnlStaying.Visible = false;
    pnlEnterTainment.Visible = false;
    pnlMisc.Visible = false;
    pnlSouvenir.Visible = false;
    pnlTransportation.Visible = false;
    pnlOverBudget.Visible = false;
    pnlOverBudget.Visible = false;
    pnlFAUse.Visible = false;

    // Set all page button enable true
    btnlist.Enabled = true;
    btnChgSch.Enabled = true;
    btnCCExchg.Enabled = true;
    btnStaying.Enabled = true;
    btnTransportation.Enabled = true;
    btnMisc.Enabled = true;
    btnSouvenir.Enabled = true;
    btnEnterTainment.Enabled = true;
    btnOverBudget.Enabled = true;
    btnFAUse.Enabled = true; btnlist.Font.Bold = false;
    btnlist.ForeColor = Color.Black;
    btnChgSch.Font.Bold = false;
    btnChgSch.ForeColor = Color.Black;
    btnCCExchg.Font.Bold = false;
    btnCCExchg.ForeColor = Color.Black;
    btnTransportation.Font.Bold = false;
    btnTransportation.ForeColor = Color.Black;
    btnEnterTainment.Font.Bold = false;
    btnEnterTainment.ForeColor = Color.Black;
    btnFAUse.Font.Bold = false;
    btnFAUse.ForeColor = Color.Black;
    btnMisc.Font.Bold = false;
    btnMisc.ForeColor = Color.Black;
    btnOverBudget.Font.Bold = false;
    btnOverBudget.ForeColor = Color.Black;
    btnSouvenir.Font.Bold = false;
    btnSouvenir.ForeColor = Color.Black;
    btnStaying.Font.Bold = false;
    btnStaying.ForeColor = Color.Black; // page type 
    switch(strType)
    {
    case pageType.List:
    pnlList.Visible = true;
    btnlist.Font.Bold = true;
    btnlist.ForeColor = Color.Red;
    break;
    case pageType.ChgSch:
    pnlChgSch.Visible = true;
    btnChgSch.Font.Bold = true;
    btnChgSch.ForeColor = Color.Red;
    break;
    case pageType.CCExchg:
    pnlCCExchg.Visible = true;
    btnCCExchg.Font.Bold = true;
    btnCCExchg.ForeColor = Color.Red;
    break;
    case pageType.Transportation:
    pnlTransportation.Visible = true;
    btnTransportation.Font.Bold = true;
    btnTransportation.ForeColor = Color.Red;
    break;
    case pageType.EnterTainment:
    pnlEnterTainment.Visible = true;
    btnEnterTainment.Font.Bold = true;
    btnEnterTainment.ForeColor = Color.Red;
    break;
    case pageType.FAUse:
    pnlFAUse.Visible = true;
    btnFAUse.Font.Bold = true;
    btnFAUse.ForeColor = Color.Red;
    break;
    case pageType.Misc:
    pnlMisc.Visible = true;
    btnMisc.Font.Bold = true;
    btnMisc.ForeColor = Color.Red;
    break;
    case pageType.OverBudget:
    pnlOverBudget.Visible = true;
    btnOverBudget.Font.Bold = true;
    btnOverBudget.ForeColor = Color.Red;
    break;
    case pageType.Souvenir:
    pnlSouvenir.Visible = true;
    btnSouvenir.Font.Bold = true;
    btnSouvenir.ForeColor = Color.Red;
    break;
    case pageType.Staying:
    pnlStaying.Visible = true;
    btnStaying.Font.Bold = true;
    btnStaying.ForeColor = Color.Red;
    break;
    default:break;
    }
    }
      

  5.   

    我给你哪个里面其实每个都是按扭,你选中其中一个然后在事件里选择click就可以了
    至于如何根据用户的选择打开不同的窗体,这个你也可以使用里面选项卡,点击按扭时就在选项卡之间相互切换,如果是窗体可能就hide()和show()了
      

  6.   

    多谢各位。已经可以了。用Seeko0(阿 枫(技术中国www.mstc.com.cn))的方法实现的,再次感谢