textarea scrollbar and text select (v2.0.1)
After looking around and trying to find some information on textareas I came up with the following:
var log_area = new AW.System.Control;
log_area.setTag("TEXTAREA");
log_area.setId("LogArea");
log_area.setAttribute("readonly", "true");
log_area.setContent('value', "<log data>");
Now..I have two problems:
1) is there a way to highlight data within the block? The readonly attribute I thought might be the culprit but I have another block that isn't readonly and it does the same thing whereas I can't highlight text.
2) Secondly, and more importantly, my scrollbars are missing and I can't figure out how to get them to show.
Any help would be much appreciated.
Mike
July 12,
Solved #2 with "overflow: auto;" in the css for that element. Any thoughts on 1?
Mike
July 12,
Mike, I tried your sample and also the similar Jim hunter subclass, but no luck.
Any reason you can't use a normal AW.HTML.TEXTAREA ?
cause you can select-text in it even if disabled.
Carlos
July 14,
Honestly, I even considered using a Div block to accomplish it...
What I need is a block of text on a control style window such as in the example where the IE options box is displayed. I just need to be able to put a ticket work history that needs to be selectable, disableable, and scrollable as well as setting the absolute size and position.
Any way of doing that I'm cool with but I didn't have any luck getting the AW.HTML.TEXTAREA to work thus why I went with the method I have currently.
Honestly, I ideally I'd like to be able to bold certain points in the log too but I know (well at least I'm pretty sure) that textareas don't support that at all.
Mike
July 14,
Thanks for the help...I got the thing working with the following. The main problem I seem to have been having with it was not having "position: absolute;" in the style.
var log_area = new AW.HTML.TEXTAREA;
log_area.setId("LogArea");
log_area.setAttribute("readonly", "true");
log_area.setContent("html", "$entry->{COMMENTS_WORK_LOG}");
My last problem with this same thing is that the scrollbar doesn't work well with the mouse. Sometimes the mouse will move it, sometimes not, and when it does move it, it won't go all the way up or down. Ideas?
Mike
July 14,
I see, nothing easy ;-)
As you describe it, I first thought about a list control, but it's limmited to rows and (disableable & absolute s/p) does not match at all.
Another more complicated option is a Grid 1 big-height-cell (1row-1col)
placing some divs and/or controls inside ( something like grid-in-grid, but just one cell and allways expanded). ( which could be a pain ... )
At the end, maybe a Div container is the better/simplest choice.
Thanks
Carlos
July 14,