示例#1
0
        LayoutFarm.HtmlWidgets.ComboBox CreateComboBox(int x, int y)
        {
            LayoutFarm.HtmlWidgets.ComboBox comboBox = new HtmlWidgets.ComboBox(400, 20);
            comboBox.SetLocation(x, y);


            ////--------------------
            ////1. create landing part
            //var landPart = new LightHtmlBox(this.myHtmlHost, 400, 02);
            //landPart.LoadHtmlDom(CreateMenuItemDetail());
            //comboBox.LandPart = landPart;
            ////--------------------------------------
            ////add small px to land part
            ////image
            ////load bitmap with gdi+

            ////LayoutFarm.CustomWidgets.ImageBox imgBox = new CustomWidgets.ImageBox(arrowBmp.Image.Width, arrowBmp.Image.Height);
            ////imgBox.ImageBinder = arrowBmp;
            ////--------------------------------------
            ////2. float part
            //var floatPart = new LightHtmlBox(this.myHtmlHost, 400, 100);
            //comboBox.FloatPart = floatPart;

            ////--------------------------------------
            ////if click on this image then
            //imgBox.MouseDown += (s, e) =>
            //{
            //    e.CancelBubbling = true;

            //    if (comboBox.IsOpen)
            //    {
            //        comboBox.CloseHinge();
            //    }
            //    else
            //    {
            //        comboBox.OpenHinge();
            //    }
            //};
            //landPart.AddChildBox(imgBox);


            return(comboBox);
        }
示例#2
0
        LayoutFarm.HtmlWidgets.ComboBox CreateComboBox(int x, int y)
        {
            LayoutFarm.HtmlWidgets.ComboBox comboBox = new HtmlWidgets.ComboBox(400, 20);
            comboBox.SetLocation(x, y);
            ////--------------------
            ////1. create landing part 
            //var landPart = new LightHtmlBox(this.myHtmlHost, 400, 02);
            //landPart.LoadHtmlDom(CreateMenuItemDetail());
            //comboBox.LandPart = landPart;
            ////--------------------------------------
            ////add small px to land part
            ////image
            ////load bitmap with gdi+                

            ////LayoutFarm.CustomWidgets.ImageBox imgBox = new CustomWidgets.ImageBox(arrowBmp.Image.Width, arrowBmp.Image.Height);
            ////imgBox.ImageBinder = arrowBmp;
            ////--------------------------------------
            ////2. float part
            //var floatPart = new LightHtmlBox(this.myHtmlHost, 400, 100);
            //comboBox.FloatPart = floatPart;

            ////--------------------------------------
            ////if click on this image then
            //imgBox.MouseDown += (s, e) =>
            //{
            //    e.CancelBubbling = true;

            //    if (comboBox.IsOpen)
            //    {
            //        comboBox.CloseHinge();
            //    }
            //    else
            //    {
            //        comboBox.OpenHinge();
            //    }
            //};
            //landPart.AddChildBox(imgBox);


            return comboBox;
        }