How to add vertical scroll bars on textarea in Actionscript 3? - actionscript-3

I wants to add vertical scroll bar in textarea spark component, i.e I want to show maximum 5 lines in textarea if text line will more than 5 then vertical scroll bar will automatically add and if i will reduce the text line then vertical scroll bar will automatically disappear.
My textarea code is :
<s:TextArea id="txtArea" width="{this.width}" height="3" borderVisible="false" focusAlpha="0.01"
selectionHighlighting="always" styleName="TextBox"
needsSoftKeyboard="true" focusRect="false" direction="{textBoxDirction}" buttonMode="true" useHandCursor="true" mouseChildren="true"/>
I also tried to use verticalScrollPolicy = "on" and "off" but it is also not working.
So if anybody have an idea how to add vertical scroll bar in textarea please help me to solve this problem.

Use
heightInLines="5"
instead of
height="3"

Just put the mx:TextArea with width="100%" inside a mx:VBox container with a fixed height.

Related

How to make word wrap on text field in scroll pane work properly and not trigger horizontal scroll

I have a textfield ("noteText") inside a container movieclip ("noteContainer"), and I'm setting a scrollpane's source to
scrollPane.source = noteContainer;
It all works well, however word wrap is doing this:
ie it's triggering the horizontal scrolling. I want it to wrap where it should and not trigger the horizontal scroller.
I could make noteText's width smaller, but I want to keep it the same width as noteContainer to make the most of screen real estate.
How do I get the wrap to take into account the width of the vertical scrollbar please?
Thank you for your time and help.
It's because I hadn't set the autoSize property of "noteText" - once set toe "left", it fixed it.

Overflow-y: auto not working with mouse wheel, only when sliding the scrollbar

I am using a widget with custom content inside, which is placed in regular <div> tags. I have set max-height to the content, and I would like to have vertical scrollbar only when needed - that's why I use overflow-y: auto.
The scrollbar shows in the right place, but I have an issue scrolling with the mouse wheel. I am able to scroll only by clicking and sliding the scrollbar, but not when I try to scroll with the mouse wheel?
Am I missing to set some other properties? Thanks in advance.

Allow horizontal scrolling on table with bottom visible at all times

I'd like to add a horizontal scroll to a bootstrap page. Currently the way it is set up is to have the user scroll all the way to the bottom of the page the page and then use the horizontal scroll. I'd like to have it set up so the scroll is always visible. I have recreated the issue in jsfiddle.
Js-Fiddle
<table class="table">
If you still want it to be like this but this is not hte proper thing to do in bootstrap add the following css property
.container{
overflow:scroll;
position:absolute;
}
https://jsfiddle.net/Siddharth_Pandey/5usukas1/
You are using table-responsive that's why the scroll is moving to the bottom of the page just remove the responsive from all thought your design will change little bit but you can set it with css jsfiddle.net/Siddharth_Pandey/5usukas1

how to show/hide vertical scrolbar automatically in slickgrid

Basically i am trying to insert scrollbar to slickgrid in my application. Here I am initializing the slickgrid and loading it on popup open. Issue is, when the rows are mininum (i.e one for example) the scroll bar appears when overflow-y is set to scroll. How to make the vertical scroll bar hide when the number of rows are lesser than the height of the given div and appear when the rows exceed the fixed height? Please find the code below.
<td id="popupView" style="padding-left:10px;float:left">
<a href="#" onclick="popupView()" style="color:blue;" >slickgrid </a></td>
Onclick of "slickgrid" a popup opens which will load slickgrid that is initialized below (javascript for grid is assumed to have initialized):
<div id="slickgridGrid" style="height:99%;width:100%;border:1px solid lightgray;overflow-y:scroll;" >
The overflow-y property is mentioned for appearance of vertical scrollbar in grid,which will appear even when a single row appears. Please help me resolve the problem. Thank you in advance.
var gridOptions = { autoHeight:true };
you need to set the autoHeight option and then the page scrolls according to the height of the grid. You can also set a min-height for the surrounding div to avoid a small grid when there is no data.

Can we add scroll bar on css tooltip ?

<span class="field-tip"><span class="tip-content">Put help text in here!</span></span>
I need to add scrollbar for tooltip content which is "put help text in here!". Can anyone please help.
you could add overflow-y: visible; to your div definition in your css and that would work.
if you use scroll i would suggest you use overflow-y or overflow-x and not just overflow on it's own or else you get arrows in all directions
overflow-y: auto
You'll use auto so that he only will be able to scroll if necessary. (so if the inner content takes up more space than the outer box the content lives in)
That'll do the trick.