cancel
Showing results for 
Search instead for 
Did you mean: 

How to have a blank between 2 buttons?

Former Member
0 Kudos

Hi there..

I have 2 buttons lined up horizontally. However they are just next to each other but I want to have a space/blank between them.. How can I do it?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI,

Create an Invisible UI element and set the below property.

Set the width to 40%(You may give what ever blankgap you need)

Reagrds,

Lavanya.G

Former Member
0 Kudos

How do you set the width for it? I do not have the field 'width' that I could set when i place all these in the TransparentContainer so that the 2 buttons and the InvisElement is all in 1 line.

pravesh_verma
Active Contributor
0 Kudos

Hi Jackson,

Very easy!! Put both the buttons in a new container. Set the Layout of that "GridLayout". As soon as you change the layout type you will get the property of Cell padding and Cell spacing. Set the required spacing. You can try it wil 2 or 3, you will see the change in the view designer itself.

This will solve the issue.

Also remember since you have 2 buttons therefore set the ColCount to 2. Which means there are 2 UI elements in that container.

I hope this solves the issue.

Thanks and Regards,

Pravesh

Former Member
0 Kudos

Thank you guys!!

Former Member
0 Kudos

So many answers, so many nonsense. Just add your buttons inside a ButtonRow, this will give the correct spacing.

Armin

Former Member
0 Kudos

This shows that we are creative people!!

Former Member
0 Kudos

Either this, or that you don't read the Javadoc

Armin

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi jackson,

U can insert a new button b/w those 2 buttons...n set * visible property* of this new button as none.

otherway is tht u can insert a textview b/w thm inspite of new button & set visible property of this textview as none..

U can adjust space by giving sme text on newbutton or textview.. keep text length as long as u want to keep space b/w 2 buttons.

hope it sloves ur problm

Regards

Khushboo

Former Member
0 Kudos

Hi,

In the LayoutData property of the first button set the paddingRight property to 40px and for second button set the LayoutData property and set the paddingLeft to 40px and see the results. If required vary the 40px accordingly.

Regards.

Rajat

Former Member
0 Kudos

Hi Jackson,

Create one value attribute named emptySpace in the context of view layout.

Also you need to create one textview b/w 2 button and in the text property of textview use that context value attribute.

Then goto wdModifyview of the view implementation tab and write the following code inside wdModifyView method

wdContext.currentContextElement().setSpace(" ");

That will resolve your problem.

Thanks

Kanai

Former Member
0 Kudos

Hi Jackson,

Checkout the InvisibleElement UI element.

From help.sap.com: http://help.sap.com/saphelp_nw04/helpdata/en/98/71d00e15144241b61753fb7008119d/frameset.htm

Regards,

Alka.