AS3: Increase size of scroll bar - ios

This my be a really simple question but I have googled so hard looking for an answer. I have a datagrid which displays a long list of information. Its an iOS app so the input is touch and the scroll bar is tiny. How can I increase its size for easier use?
Thanks =)

Feathers is as3 solution to mobile ui : http://feathersui.com

These scrollbars can be targeted by DataGridInstance.verticalScrollBar and DataGridInstance.horizontalScrollBar. These are actually ScrollBar instances so you can use the .setSize() method or .width and .height setters to resize these.
However, the documentation indicates:
Note: If you use the setSize() method, you can change only the width of a horizontal scroll bar or the height of a vertical scroll bar. At the time of authoring you can set the height of a horizontal scroll bar or the width of a vertical scroll bar, but the values will be reset when the movie is published. Only the dimension of a scroll bar that corresponds to its length can be changed.
So I'm afraid it's not an option with the built-in component.

Use code like this:
dataGrid.scroller.verticalScrollBar.scaleX = 2;

Related

UIScrollView & AutoLayout - UIScrollView Over scrolling (showing excessive whitespace at bottom)

I have a login page with a bunch of elements on it:
UIScrollView
Content View (UIView)
Email Text Field
Password Text Field
Login Button
Etc.
I need my app to run perfectly in both portrait and landscape orientations so I began setting up the different constraints to get AutoLayout working properly. I finally have all my UI elements in the right positions for both Portrait and Landscape, but the issue is that my scroll view scrolls too much and leaves a lot of empty white space at the bottom of the view when fully scrolled. I would like to fix this and keep things tight but I am not sure why. It's clearly the contentSize of the scrollview that is being set too large for the y value but I do not want to fix this with a workaround programmatically as I'm sure there should be the "correct" fix out there.
I've attached screenshots of the login page normal and fully scrolled (portrait and landscape) to help further understand.
Any help would be greatly appreciated. Thanks!
To adjust the height of scroll view, you need to do these two things:-
In the size inspector of scroll view, change the intrinsic size to "PlaceHolder".
Make sure you have added enough constraints that height of scroll view can be calculated. Since the contents in your scroll view are of static height, you can simply add a height constraint to your scroll view.
I'm not a 100% sure of this, but it could be that the view extends over the nav bar, causing the scrollview to have a much larger height than it should. IF that is the case, then autolayout-ing your view cause elements to be displayed everywhere else, other than the places you want them to be.
You'll need to disable Extends Under Top Bars in the attributes inspector.
I too had problem with scrollview my problem was that in iOS8 the scrollview was leaving some white space from top. I got crazy, finally I saw the solution by Ali Awais in this post and it fixed it
Here is the solution and link by Ali
I faced the same issue in iOS 8, following is solution I found: - Select View Contoller (in storybord) in which you have added the scroll view - In "Property Inspector" in "Layout" section un-check "Adjust Scroll View Insets"
White space scroll view
-anoop

UIWebView contentInset without extra height at bottom

I'm creating a view controller that uses a web view which slides behind the navigation bar and status bar. To do this, I'm setting the webView.scrollView.contentInset property to have a top inset of 64.
However, this doesn't shrink the amount of area the web view wants to take up, so if a page is less than a screenful, it has 64 px of white space at the bottom to scroll through. The web views are in a vertical UIPageViewController, so this disrupts paging. Is there some way to get rid of this extra space?
Have you tried something like adjusting the webview's scrollview content insets? Example:
webView.scrollView.contentInset = UIEdgeInsetsMake(0, 0,64, 0)
It sounds like what you need is to adjust the webView.scrollView.contentSize and adjust the height by 64. You may need to provide more information about how it slides behind the nav bar and status bar to help me answer this. I would take a look at this section of the Scroll View Programming Guide:
http://developer.apple.com/library/ios/#documentation/WindowsViews/Conceptual/UIScrollView_pg/CreatingBasicScrollViews/CreatingBasicScrollViews.html
Change the clipsToBounds.
webView.clipsToBounds = NO;
This will make its content visible outside its frame, so set its frame like normal, right under the navigation bar. The navigation bar will be translucent and you will see its content under it.
Don't forget to disable Autolayout for the web view!
I've sort of made an end-run around this problem by disabling scrolling on short pages. Basically, I use -stringByEvaluatingJavaScriptFromString: to run some JavaScript inside the page that walks down from document.body and computes the position of the bottom of the bottommost element. (document.body itself is always at least as large as the viewport, so I can't look at its size.) Then, back in Objective-C-land, I compare that to the height of the web view (less the inset), and if it's less, I disable scrolling. This is not a perfect solution, but it covers the worst symptoms.
If someone can come up with a better solution than this, I'd love to hear about it! Either way, I can't award the bounty to myself, so someone will be getting it.

Scroll bars on DB grids - seeking a definitive approach

I see lots of DB scroll bar questions, but never seem to find a definitive answer to this one.
There is no option (property) to add/hide DB grid scroll bars, either singly or jointly. The simply auto-appear when needed.
If I don't have enough rows to scroll, I would like my columns to fill the entire grid.
If I design it so then when a vertical scroll bar is added at run-time a horizontal scrollbar is auto-added too (since I just covered the right part of the right most column with a vertical scroll bar, we now need a horizontal scroll bar to see what I am covering).
One option is to design my grid such that there is enough space at the right hand size (how many pixels?) to accommodate a vertical scroll, but that is unsightly until there are enough rows to trigger a scroll bar (if ever).
It seems to me that the most aesthetically pleasing way would be start with a grid which is filled with columns at X pixels wide and increase its width to X + width of vertical scroll bar (or decrease the width of one/some of the grids columns by a total of width of vertical scroll bar) pixels when adding a new row causes the vertical scrollbar to appear.
Am I missing something? Is there a “correct” way to do this, or an industry standard way (I am not asking for a “best” way or anything too subjective, so please don’t close. I believe that a lot of people need to know this).
Is there anything in the standard TDBgrid to facilitate this?
Bonus: I subscribe to TMS components, so if there is a way to do this simply with TAdvDbgrid, that would be fine for me, but a general solution with TDBgrid would be fine.
Non-subjective question: Given that
- I do not want to increase the width of my TDBgrid
- and that I do not want a blank white column at the right when no vertical scroll bar is present
- and that I am willing to decrease the width of my right-most column in order to avoid a horizontal scroll bar appearing when a vertical scroll bar appears
... how do I do so?
[Update]
Ken was rightly awarded the answer becuse his solution is best for most users.
For those like me who already paid for a TMS subscription, I just noticed that their TDbAdvgrid component has a ScrollBars property and when I set it to ssVertical, it does what I want.
Now, if I could only figure out a good way to have fixed header row when it is the only row ...
TJvDBGrid (part of the JEDI JVCL) has this capability built in, and includes source code. It should be able to either do what you need, or give you the details needed to implement your own descendant.

Is there a way to make something truly free scrolling div (any direction) on iOs webview

I want a div that can be dragged any direction and is about 4x width and 4x height of the screen.
I set the body height and width, and you can scroll it diagonally some of the time, but other times when you go to scroll it will go only straight vertically or straight horizontally. It seems to be when you start scrolling straight up, it sticks that way. Is this normal for scrolling in an oversized webview div, or is there something else that might explain this?
This is on an iPad, with a body set to width:4000px and height:3000px.
The iPhone's tendency to scroll exactly horizontally or exactly vertically is intentional, and it's usually a useful feature: if you're reading a tall column of text that could scroll horizontally, it's nice to be able to scroll down without worrying about accidentally moving the view from side to side as you go. As far as I'm aware there's no way to turn this behavior off.
there is a property name directionalLockEnabled that get a bool
in scrollView class.
this will do the trick:
theWebView.scrollView.directionalLockEnabled = NO;

Adding vertical scrollbar to screen in blackberry application

hi I am new to blackberry development..
I am trying to add a vertical scroll bar on the screen, but not able to do that. because I do not know the way.
VerticalScrollManger scroll = new VerticalScrollManager(Manager.VERTICAL_SCROLL);
please give me the solution.
thanks
Things that extends net.rim.device.api.ui.Manager (like a VerticalFieldManager) can have style bits set in the constructor that specify which type(s) of scrolling you want and whether or not the scrollbars (arrows) should be displayed. Put your Field into a manager that has scrolling enabled and set the manager for the screen You need to set the manager containing the component/field that is too large for the screen to have scrolling enabled AND scrollbars drawn to see scroll arrows.
The style bits you want to set are: Manager.VERTICAL_SCROLL | Manager.VERTICAL_SCROLLBAR
If your UI is built on top of the blackberry classes MainScreen or FullScreen, you can use the constructor taking an argument of type long to set the style bits: MainScreen(long style) could be called as MainScreen(Manager.VERTICAL_SCROLL | Manager.VERTICAL_SCROLLBAR); to set the style bits for the screen to include scrolling and vertical scroll indicator arrows.
There is an occasional issue that FieldManagers that are fixed size will sometimes not show scroll arrows (but they'll still scroll). See Blackberry VerticalFieldManager with fixed size : Scroll issue if you are concerned about that issue.
If by scrollbars you mean the small blue arrows, then you can get these to display using the method Jessica described above (set style bits VERTICAL_SCROLL and VERTICAL_SCROLLBAR). However, if by scrollbars you are referring to actual bars that indicate the scrolled position (as seen in the Browser app) then you would need to draw these on the manager yourself, as the BlackBerry API doesn't provide you with any way to display them automatically.
To do something like that you'd need to subclass VerticalFieldManager and override the paint method. Use a combination of the screen height (Display.getHeight()), the manager height (getVirtualHeight()) and the scroll position (getVerticalScroll()) to calculate the Y position and height of the bar, and then draw it on the screen using g.drawRect() or something similar.
If you want a fancier-looking scrollbar, take a look at my article in BlackBerry knowledge base:
http://supportforums.blackberry.com/t5/Java-Development/Implementing-a-standard-style-scrollbar-on-a-Blackberry-device/ta-p/504416

Resources