Пример #1
0
        public virtual void InternalSetOwner(__ToolStrip __ToolStrip)
        {
            this.Owner = __ToolStrip;

            if (InternalAfterSetOwner != null)
            {
                InternalAfterSetOwner();
            }

            //new IHTMLButton { this.Name }.AttachTo(
            //__ToolStrip.InternalElement
            //);
        }
        public __ToolStripTextBox()
        {
            this.TextChanged += delegate
            {
                this.InternalElement.value = this.InternalText;
            };

            this.InternalAfterSetOwner +=
                delegate
            {
                __ToolStrip o = this.Owner;

                // or contaner?
                InternalElement.AttachTo(o.InternalElement);
            };
        }
Пример #3
0
        public virtual void InternalSetOwner(__ToolStrip __ToolStrip)
        {

            this.Owner = __ToolStrip;

            if (InternalAfterSetOwner != null)
                InternalAfterSetOwner();

            //new IHTMLButton { this.Name }.AttachTo(
            //__ToolStrip.InternalElement
            //);

        }
Пример #4
0
        public __ToolStripButton()
        {
            (this.InternalElement.style.display as dynamic).display = "table-cell";

            var InternalElementSpan = new IHTMLSpan().AttachTo(InternalElement);

            //InternalElementSpan.style.verticalAlign = "baseline";

            this.InternalElement.style.font = Control.DefaultFont.ToCssString();


            //this.Font = DefaultFont;

            this.InternalImageChanged +=
                delegate
            {
                if (this.InternalImage == null)
                {
                    return;
                }

                var i = ((__Bitmap)(object)this.InternalImage).InternalImage;

                // https://developer.mozilla.org/en-US/docs/Web/CSS/vertical-align
                //i.style.verticalAlign = "baseline";

                this.InternalElement.insertBefore(
                    i,
                    InternalElementSpan
                    );

                if (this.DisplayStyle == ToolStripItemDisplayStyle.Image)
                {
                    i.InvokeOnComplete(
                        delegate
                    {
                        InternalElementSpan.Hide();
                    }
                        );
                }
            };

            this.InternalElement.onclick +=
                delegate
            {
                this.RaiseClick();
            };

            this.TextChanged += delegate
            {
                InternalElementSpan.innerText = this.InternalText;
            };

            this.InternalAfterSetOwner +=
                delegate
            {
                __ToolStrip o = this.Owner;

                // or contaner?
                InternalElement.AttachTo(o.InternalElement);
            };
        }