Exemplo n.º 1
0
        public ImageTextWidget(int x, int y, int width, int height, string text)
            : base()
        {
            // left hand image
            Image kisi = new Image(Resources.GetBitmap(Resources.BitmapResources.kisi));

            image_element.set_position(x, y);
            image_element.set_colours(BackgroundColor, BorderColor);
            image_element.set_image(kisi);
            elements.Add(image_element);

            // float left text
            text_element.set_position(x + 28, y);
            text_element.set_size(width - 28, height);
            text_element.set_colours(BackgroundColor, BorderColor);
            text_element.set_text(text, font, BorderColor);
            elements.Add(text_element);

            EventHandler event_handler = new EventHandler(OnClickDown);

            image_element.ClickDown += event_handler;
            text_element.ClickDown  += event_handler;

            EventHandler up_event_handler = new EventHandler(OnClickUp);

            image_element.ClickUp += up_event_handler;
            text_element.ClickUp  += up_event_handler;

            this.text = text;
            this.register_elements();
        }
        public ImageWidget(int x, int y, int width, int height)
            : base()
        {
            Image kisi = new Image(Resources.GetBitmap(Resources.BitmapResources.kisi));

            BaseElement element = new BaseElement();
            element.set_position(x, y);
            element.set_colours(BackgroundColor, BorderColor);
            element.set_image(kisi);
            element.ClickDown += new EventHandler(OnClickDown);
            element.ClickUp += new EventHandler(OnClickUp);
            elements.Add(element);
            this.register_elements();
        }
        public DropDownWidget(int x, int y, int width, int height, Image img) : base()
        {
            this.x              = x;
            this.y              = y;
            this.options_width  = width;
            this.options_height = height;

            start_image = new BaseElement();
            start_image.set_position(x, y);
            start_image.set_colours(BackgroundColor, BorderColor);
            start_image.set_image(img);
            start_image.ClickUp += new EventHandler(toggle_dropdown);
            elements.Add(start_image);
            this.register_elements();
        }
Exemplo n.º 4
0
        public ImageWidget(int x, int y, int width, int height)
            : base()
        {
            Image kisi = new Image(Resources.GetBitmap(Resources.BitmapResources.kisi));

            BaseElement element = new BaseElement();

            element.set_position(x, y);
            element.set_colours(BackgroundColor, BorderColor);
            element.set_image(kisi);
            element.ClickDown += new EventHandler(OnClickDown);
            element.ClickUp   += new EventHandler(OnClickUp);
            elements.Add(element);
            this.register_elements();
        }
        public DropDownWidget(int x, int y, int width, int height, Image img)
            : base()
        {
            this.x = x;
            this.y = y;
            this.options_width = width;
            this.options_height = height;

            start_image = new BaseElement();
            start_image.set_position(x, y);
            start_image.set_colours(BackgroundColor, BorderColor);
            start_image.set_image(img);
            start_image.ClickUp += new EventHandler(toggle_dropdown);
            elements.Add(start_image);
            this.register_elements();
        }