All the screens I've designed for BlackBerry so far I set the position coordinates statically, without the need of a vertical scroll.
I do not understand how to use this vertical manager to scroll and see the list.
We have to create vertical field manager as follow
VerticalFieldManager manager=
new VerticalFieldManager(
Manager.VERTICAL_SCROLL |
Manager.VERTICAL_SCROLLBAR );
to scroll fields in vertical field manager.
The following link will also help you.
How to set a ScrollBar to the VerticalFieldManager in Blackberry?
Related
I have a Form that take a BoxLayout, to be able to add different custom controls one after the other in the Y-AXIS
but there is a Component that I need to add in the bottom of the screen, but as I'm using the BoxLayout so I can't fix it size to bottom of the screen
So I think that I can set that Container of the control to fill the parent Form
So the question is how to make Container fill the parent Form in LWUIT
Thanks in Advance
Why don't you try to put a BorderLayout in the Form?
You can put Containers in CENTER and SOUTH positions, and they let you place your controls as you want (BoxLayout Axis Y in the center).
Is that what you want?
For an application I am working on, their is a requirement for a custom overlay to display detailed information about a selected item. I am using jQuery Tools for this but am having issues centering the overlay vertically within the user's viewport. Because the page is so tall it is rarely in an appropriate location (either to high or to low). How can I force this overlay to be centered?
You can indeed center the overlay with jQuery Tools. They were kind enough to include this functionality. If you read the source it has a conditional check for if the option key "top" has the value of "center"
Thus,
$(".overlay").overlay({
top: "center"
});
And that's it!
I'm building a toolbar in PyGTK and attaching a combo box to it. The result that I got is that the combo box stretches to fill all the vertical space available:
I have been trying every trick in the book that I can think of in order to avoid it, but I'm starting to admit that maybe it's just GTK style and I won't be able to get rid of it.
I can post some code but this should be quite simple to recreate. Any idea?
Wrap the combobox in a gtk.Alignment. You can create the latter with 0.5 vertical alignment to have the combobox centered vertically.
I want to create a PictureScrollField using some images in Blackberry.By default it is displayed on the top of the screen with the given width and height.
But if we want to display the entire one at certain coordinates say(x,y),then how to align them.
add the picture scroll field in a horizontal field manager and align the manager
Folks,
coming from the Java/Swing world, I am sometimes puzzled by the UI programming on the iPhone. I've spent the last hours with Googling for information but it seems that I asked the wrong questions by thinking too much in Java. Could you please point me to resources to get more familiar with the GUI concepts to be able to achive the following functionality:
Basically, I want to create a vertically scrollable view that represents structured text (for example, a recipe). Each step consists of a title and a textual description. As I want to fold and unfold such steps, the title would be somehow interactive and by clicking it the description would be displayed or hidden.
In Java, I would create a component that renders one such section. The layout manager would compute the components preferred height (with or without description being displayed).
Then, in Java, I would create a panel with a vertical layout manager and sequentially add my components. This panel would be placed in a scroll pane; the scroll pane would ask the panel to layout itself and then show a viewport on it, if for example the height is bigger than the scroll pane's height.
What Java provides me is:
layouting of elements (computing their preferred height and width), thus no need to deal with coordinates and dimensions
dynamic creation of UIs by creating and adding components during runtime
What I understood on the iPhone:
I can dynamically add views as subview to a view, e.g. a scrollview by calling addSubview
I can even remove that stuff using removeFromSubview (as explained here Clear content of UIScrollView)
What I don't understand on the iPhone:
does one view always correspond to a visible screen (I did use tab and navbar navigation so far and there whenever I set a new view, it fills the current visible screen minus the space needed for the two bars)?
or is it possible to define a view that contains a label on top ("north") and a text in center; if so, could such a view automatically determine its height?
can I realize my example in a similar way like in Java or would I need to calculate all dimensions and coordinates of the individual components on my own? (This example seems to touch on that topic: iPhone scrollView add elements dynamically with id)
Alternatively, could I use a WebView and render my stuff as local HTML using JavaScript to show or hide nodes?
Thanks for any hint or link!
There are no layout managers in Cocoa, views are being reposition according to their struts and springs settings. For information on that read the documentation: http://developer.apple.com/library/ios/#documentation/DeveloperTools/Conceptual/IB_UserGuide/Layout/Layout.html
To create a "view that contains a label on top and a text in center" you create a view with subviews - one being a label at the top, second the textview in center. If you configure struts/springs for all of subviews properly, they will autoresize when the container view is resized.
You should also get accustomed to Interface Builder, creating views in code is real pain in the ass.