Beispiel #1
0
        public CDoubleDecorator(CEditField decoratee)
            : base(null)
        {
            // create list that will hold two controls (text and edit)
            CComponentList list = new CComponentList();

            // set list position
            list.PosY = decoratee.PosY;

            // take prompt data from decoratee and put it into text control
            int pos = decoratee.PosY;

            _text      = new CText(decoratee.Prompt);
            _text.PosY = pos;

            // put decoratee (edit) under text control and erase prompt
            decoratee.PosY   = pos + 1;
            decoratee.Prompt = "";

            // add both controls
            list.add(_text);
            list.add(decoratee);
            // set list as decoratee
            _component = list;
        }
Beispiel #2
0
        public CDoubleDecorator(CEditField decoratee)
            : base(null)
        {
            // create list that will hold two controls (text and edit)
            CComponentList list = new CComponentList();
            // set list position
            list.PosY = decoratee.PosY;

            // take prompt data from decoratee and put it into text control
            int pos = decoratee.PosY;
            _text = new CText(decoratee.Prompt);
            _text.PosY = pos;

            // put decoratee (edit) under text control and erase prompt
            decoratee.PosY = pos + 1;
            decoratee.Prompt = "";

            // add both controls
            list.add(_text);
            list.add(decoratee);
            // set list as decoratee
            _component = list;
        }