cancel
Showing results for 
Search instead for 
Did you mean: 

UI alignments

Former Member
0 Kudos

Hi,

I m creating the elements dynamically. But i couldnt align the UI elements properly. Please help to resolve the issue.

i am getting the UI elements like this

<b>text_view1 label1 Dropdown1 text1 inputfield1

label2 Dropdown2 text2 inputfield2</b>

but i need like this

<b>text_view1 label1 Dropdown1 text1 inputfield1

label2 Dropdown2 text2 inputfield2</b>

i have used vertical Gutter to have left padding but still UI looks mess. Is there any thing else for UI alignment other than v_Gutter.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

text_view1 label1 Dropdown1 text1 inputfield1

&nspb; label2 Dropdown2 text2 inputfield2

Former Member
0 Kudos

Hi,

you can add an invisibleuielement (CL_WD_INVISIBLE_ELEMENT) every time you

need a &nspb; in eg a gridlayout.

grtz,

Koen

Former Member
0 Kudos

Sorry.. i entered &nspb wrongly.. i need label2 should come below label and similarly other UI elements too..

Former Member
0 Kudos

hi vimal....

have the rootuielement container as grid and column as 5 .

for the other elements:

text_view1 row 1 column 1

label1 row 1 column 2

Dropdown1 row 1 column 3

text1 row 1 column 4

inputfield1 row 1 coulmn 5

label2 row 2 col 2

Dropdown2 row 2 col 3

text2 row 2 col 4

inputfield2 row 2 col 5

---regards,

alex b justin

Former Member
0 Kudos

Hi,

if you are using a gridlayout or a matrixlayout,

than just add the element where nothing should appear, everything will be aligned that way

grtz,

Koen

Former Member
0 Kudos

thanks.. i think grid layout will help to solve the issue.

How to give row and column number in setting up layout dynamically?

Is there any class or method to set up gird layout to mention this numbers?

Former Member
0 Kudos

Hi,

CL_WD_GRID_LAYOUT with method: SET_COL_COUNT

grtz,

Koen

Former Member
0 Kudos

hi vimal........

no need for a row.. that was for your reference.

you can set the coulmn number using set_col_count in the class cl_wd_grid_layout.

---regards,

alex b justin

Former Member
0 Kudos

Then how to mention which element should come in which row and in particular column. since i have to leave row2 column1 blank. So how to solve this? if you have any piece of sample code that will really help me.

Former Member
0 Kudos

Hi,

as stated before:

your coll_count is the maximum number of items on one line

your blank space is an object

lo_space = cl_wd_invisible_element=>new_invisible_element( ).

add that via ->add_child( ). as first element of the line2

grtz,

Koen

Former Member
0 Kudos

hi vimal......

you should mention in the same order you want.

when you insert first element give col as 1, then 2,....... so on.

so it will be aligned in the same row.

when you come to label 2 mention it as col 2 again.

so it will be present below label 1 in the second row.

---regards,

alex b justin

Answers (0)