Esempio n. 1
0
        ////////////////////////////////////////////////////////////////////////////

        ////////////////////////////////////////////////////////////////////////////
        void btnDown_Click(object sender, EventArgs e)
        {
            if (items != null && items.Count > 0)
            {
                if (this.Root != null && this.Root is Container)
                {
                    (this.Root as Container).Add(lstCombo, false);
                    lstCombo.Alpha = Root.Alpha;
                    lstCombo.Left  = AbsoluteLeft - Root.Left;
                    lstCombo.Top   = AbsoluteTop - Root.Top + Height + 1;
                }
                else
                {
                    Manager.Add(lstCombo);
                    lstCombo.Alpha = Alpha;
                    lstCombo.Left  = AbsoluteLeft;
                    lstCombo.Top   = AbsoluteTop + Height + 1;
                }

                lstCombo.AutoHeight(maxItems);
                if (lstCombo.AbsoluteTop + lstCombo.Height > Manager.TargetHeight)
                {
                    lstCombo.Top = lstCombo.Top - Height - lstCombo.Height - 2;
                }

                lstCombo.Visible = !lstCombo.Visible;
                lstCombo.Focused = true;
                lstCombo.Width   = Width;
                lstCombo.AutoHeight(maxItems);
            }
        }