SetMargin in a manager in blackberry - blackberry

I have a Grid view with some items displayed.How can i set the margin in grid view so that the items will be inside that margin and not within the scope of the whole screen.

if ur using GridFieldManager then see this :
grid.setColumnProperty(int coolumn,int property,int value);
where grid is the object of GridFieldManager;

Related

Align Items List of a Select Component

Vaadin 14.4.7
I have a Select component on my form. If the items in the select list are enough in number, the top of the expanded list touches the top of the window and the list shows two vertical scroll bars. If I move the Layout in which the Select exists down a bit, things look okay. I was wondering, though, if there was a way to align the list of items and have it center on the Select box.
This is the image of the scroll bars:
This is the app as a whole:
This is the code that creates the Select box:
variableColumnColumnSelectbox = new Select<>();
variableColumnColumnSelectbox.setLabel("Column:");
variableColumnColumnSelectbox.getElement().getThemeList().add("selectoverlaycustom");
variableColumnColumnSelectbox.setItemLabelGenerator(DimClmn::getClmnRptHdngCd);
variableColumnColumnSelectbox.setEnabled(false);
And this is the code to create the Horizontal Layout in which the row of Select boxes resides, with my fix to move it down a little commented out:
private HorizontalLayout buildVariableColumnsGridLayout() {
HorizontalLayout variableColumnsGridHorzLayout = new HorizontalLayout();
variableColumnsGridHorzLayout.getElement().getStyle().set("max-width", "70%");
variableColumnsGridHorzLayout.getElement().getStyle().set("margin", "auto");
/*
* This top margin value is set in order to move the variables column grid down
* so that the column select box in the grid form has room to display all of the
* values properly. If the report has a lot of columns, this select list will
* show two vertical scroll-bars. I don't know why.
*/
// variableColumnsGridHorzLayout.getElement().getStyle().set("margin-top",
// "10px");
createVariableColumnsGridLayout(variableColumnsGridHorzLayout);
return variableColumnsGridHorzLayout;
}
Well, I finally figured this out. I was able to get the inner scroll bar removed with a CSS rule applied to vaadin-list-box:
[part="items"]{
overflow-y: unset;
}
So simple.
(Really, as I look at it now, I posed my question incorrectly. I should have asked how to remove the inner scroll bar, which is what I was really after.)

How to assign a component to a Delphi GridPanel row and column programmatically?

I am working on a project using Delphi where I am making rows and columns for a GridPanel dynamically. I am also creating a panel (TPanel) that I intend to place in each cell dynamically.
My question is: How do you assign the newly created panel to a particular cell that is in the GridPanel?
I am guessing that I have to assign the panel's "Parent" property so that it is the GridView. However, I have not been able to adjust a "Row" or "Column" property for the TPanel unlike when you able to when you assign a panel to the GridPanel using the design environment.
How do you assign the newly created panel to a particular cell that is
in the GridPanel?
The answer is, you can't. Adding new components to the TGridPanel, wether at design time or programmatically, places the new component in the next unoccupied cell. By default, in left to right order.
The ExpandStyle property (emAddRows or emAddColumns) determines how the TPanelGrid is expanded when filled, and further controls are added.
After you have added the new panel (or other component) to the TGridPanel you may change it's position as others have answered, by accessing the control via the ControlCollection property.
Use:
TGridPanelLayout.ControlCollection[position].row := 0;
You can access the property
TGridPanelLayout.ControlCollection[index].row := 0;
and
TGridPanelLayout.ControlCollection[index].Column := 0;

SAPUI5 vertical alignment Radiobuttongroup

Is there a way to create a radiobuttongroup with vertical alignment?
What I did is I created a verticalLayout around my radiobuttongroup shown in the picture below.
What I recieve is this:
What I want is this:
O a O b
How can I do that using a JavaScript-view in sapui5?
Its the columns property which determins how many RadioButton Items will be shown in a single row.
Check the below link: https://openui5.hana.ondemand.com/docs/api/symbols/sap.ui.commons.RadioButtonGroup.html#getColumns .
For you Code, since there are only 2 items, you can set the columns property in the RadioButtonGroup to 2.
var oRBG = new sap.ui.commons.RadioButtonGroup({
columns :2
});

How to make Vaadin Panels extend across the whole page?

How do I make my panels extend the full width across the page and not just to where their components stop?
As also cfrick suggested, use setSizeFull(), if your component is nested inside other layouts/components, you need to set all of them to full size as follows.
VerticalLayout panelWrapper = new VerticalLayout();
Panel yourPanel = new Panel();
panelWrapper.addComponent(yourPanel);
yourPanel.setSizeFull();
panelWrapper.setSizeFull();
If you have more parent components, you need to setSizeFull() all of them back to the UI root.

ObjectChoiceField automatically scroll to top after selecting a choice?

I have customized a field which contains an ObjectChoiceField. After clicking a choice,the screen just scrolls to the top and the choice field drops down from the visibile screen。Pls tell me how to prevent this。Thank you。
You can find out custom drop down list implementation in this thread: Issue in PopUpScreen
This custom drop down does what you want.

Resources