0

Text Entry Button

Hi,

I need to see the text in a Text Entry Button as I type it. I need to type in a paragraph. I'm unable to see the text and the cursor as I type in the Text Entry form when the text reaches the width of the button.

Is there any way to see the text and the cursor in case of long paragraphs?

Thanx in advance.

by
2 Replies
  • QUOTE (sunil @ May 24 2011, 05:41 AM) <{POST_SNAPBACK}>
    Hi,

    I need to see the text in a Text Entry Button as I type it. I need to type in a paragraph. I'm unable to see the text and the cursor as I type in the Text Entry form when the text reaches the width of the button.

    Is there any way to see the text and the cursor in case of long paragraphs?

    Thanx in advance.



    I had a similar problem and came up with a small workaround. Here's the relevant code (all from createView):
    CODE
    this.controls.kbTextbox=new KONtx.element.Text({
    label: '',
    styles: {
    background:'#FFFFFF',
    border:'1px solid #000000',
    color: "#000000",
    fontSize: KONtx.utility.scale(14),
    hOffset:5,
    vOffset:this.controls.kbprompt_lbl.outerHeight+5,
    width:200,
    zOrder:2,
    },
    }).appendTo(this.controls.keyboard_con);
    this.controls.kbSubmit_btn = new KONtx.element.Button({
    guid: "kbSubmit_btn",
    events: {
    onSelect: function(event) {
    self.registerMessageCenterListenerCallback(self.drawSearchResults );
    KONtx.utility.LoadingOverlay.on();
    fetchSearchResults(self.controls.kbTextbox.text);
    self.hideKeyboard();
    self.showResults();
    }
    },
    styles: {
    hOffset:this.controls.kbTextbox.outerWidth+5,
    vOffset:this.controls.kbTextbox.vOffset,
    zOrder:2,
    },
    }).appendTo(this.controls.keyboard_con);
    this.controls.kbSubmit_img = new KONtx.element.Image({
    src : 'Images/Yahoo_Interface_Icons/addcity_btn.png',
    styles:{
    height:KONtx.utility.scale(20),
    width:KONtx.utility.scale(20),
    }
    }).appendTo(this.controls.kbSubmit_btn);
    this.keyboard = new KONtx.control.Keyboard({
    controlSize: "standard",
    layout : 'alphanumeric',
    styles : {
    hAlign:'center',
    vOffset:this.controls.kbTextbox.outerHeight+10,
    zOrder : 2
    },
    events : {
    onValueChanged : function(event) {
    var chars = event.payload.value;
    self.controls.kbTextbox.setText(chars);
    }
    }
    }).appendTo(this.controls.keyboard_con);
    0
  • Sorry, I hit submit before I could type an explanation (and apparently double posted). Essentially, I created a text element with a blank label and styled it to look like a traditional text box. Instead of using a TextEntry button, I simply invoked the KONtx Kewyboard. I then used the onValueChanged event of the KONtx keyboard, and pushed the new result to that textbox.

    Please note that self is a self reference defined at the beginning of my createView (self =this). It's not a perfect match for what you've mentioned, but it may be some help.
    0

Recent Posts

in Design / Interaction - Yahoo! TV Widgets