cancel
Showing results for 
Search instead for 
Did you mean: 

htmlb:gridLayout with equally-sized cells

daniel_humberg
Contributor
0 Kudos

How can I force a htmlb:gridLayout to display all the cells in the same size (width and height), no matter what the content of the cell is?

(in this case, the cells contain htmlb:links and htmlb:textviews).

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member181879
Active Contributor
0 Kudos

Look one day at the <phtmlb:formLayout>. Does not do links, but for the rest is really a "good thing". The examples can be found via this <a href="/people/brian.mckellar/blog/2004/06/11/bsp-trouble-shooting-getting-help">weblog</a>.

++bcm

daniel_humberg
Contributor
0 Kudos

is the link correct? it leads to some weblog without any formlayout-info.

stupid question: is there a doku-page with info about all the htmlb, xhtmlb and phtmlb elements? in my workbench, the doku for phtmlb is not working ("no doku for language EN"), and on this site as well as on help.sap.com, I didn't really find an overview....

former_member181879
Active Contributor
0 Kudos

Yes, it is exactly what I wanted you to read. Which you seem not to have done. It is a guide for newbies, such as yourself, to quickly get up to speed. If you have read it, you would have found references to our test programs, where you could see this new library in action. If you have read it, you would have seen how this forum can be searched, to find topics that have been discussed to death. One topic would be the documentation of the PHTMLB library.

The art of reading far exceeds the art of writing. And it sure beats spoonfeeding each person passing through here. Wish you much enjoyment with the text. When done, you can also look at our BSP collection of weblogs. Currently 30+ of very high quality texts for your enjoyment.

++bcm

daniel_humberg
Contributor
0 Kudos

I just had a long journey on your recommended page.

The phtmlb and xhtmlb-example is very good. thx.

but complete documentation on phtmlb and xhtmlb is neither on help.sap.com, nor in one of the weblog, nor in any forum (yet).

I checked the 3 locations below and expected to find a list of all the htmlb, phtmlb and xhtmlb elements, but i think i have to wait a while for that.

http://help.sap.com/saphelp_47x200/helpdata/en/7f/366784b66711d5993900508b6b8b11/frameset.htm

http://help.sap.com/saphelp_webas630/helpdata/en/7f/366784b66711d5993900508b6b8b11/frameset.htm

http://help.sap.com/saphelp_erp2004/helpdata/de/7f/366784b66711d5993900508b6b8b11/frameset.htm

thanks anyway.

former_member181879
Active Contributor
0 Kudos

<i>If you have read it, you would have seen how this forum can be searched, to find topics that have been discussed to death. One topic would be the documentation of the PHTMLB library.</i>

<b>Find:</b> "phtmlb documentation"

Documentation for tags are online. As described in that help weblog, double click on tag, find that big button labeled "Documentation". Fetch coffee. Hit it. Read. Read some more. Throw cold coffee into pot plant on your table.

++bcm

Former Member
0 Kudos

Take a look at the tag attributes of the gridLayoutCell there is a option for width and you can use width=100px


<%@page language="abap"%>
<%@extension name="htmlb" prefix="htmlb"%>

<htmlb:content design="design2003">
  <htmlb:page title = " ">
    <htmlb:form>

        <htmlb:gridLayout
                 columnSize  = "3"
                 rowSize     = "1" 
                 width       = "200px" >
            <htmlb:gridLayoutCell
                          rowIndex = "1"
                       columnIndex = "1"
                       width="100px" >

            this is text and I hope that it longer than 100 px then again I will not be sure unless I try it.

            </htmlb:gridLayoutCell>
            <htmlb:gridLayoutCell
                          rowIndex = "1"
                       columnIndex = "2" 
                       width = "100px" >

            this is text and I hope that it longer than 100 px then again I will not be sure unless I try it.

            </htmlb:gridLayoutCell>
        </htmlb:gridLayout>

    </htmlb:form>
  </htmlb:page>
</htmlb:content>

Ok the text is a bit long but you can see that the grid cells are the same width, you can also play along with the height of the entire gridlayout.


<%@page language="abap"%>
<%@extension name="htmlb" prefix="htmlb"%>

<htmlb:content design="design2003">
  <htmlb:page title = " ">
    <htmlb:form>

        <htmlb:gridLayout
                 columnSize  = "3"
                 rowSize     = "1" 
                 width       = "200px" >
            <htmlb:gridLayoutCell
                          rowIndex = "1"
                       columnIndex = "1"
                       width="100px" >

            <span style="background:lime;background-color:lime">
            this is text and I hope that it longer than 100 px then again I will not be sure unless I try it.
            </span>
            
            </htmlb:gridLayoutCell>
            <htmlb:gridLayoutCell
                          rowIndex = "1"
                       columnIndex = "2" 
                       width = "100px" >

            <span style="background:blue;background-color:blue">
            this is text and I hope that it longer than 100 px then again I will not be sure unless I try it.
            </span>

            </htmlb:gridLayoutCell>
        </htmlb:gridLayout>

    </htmlb:form>
  </htmlb:page>
</htmlb:content>

daniel_humberg
Contributor
0 Kudos

Thanks.

So with gridlayout, you can only set the width and if you wanna adjust the hight, you have to go with xhtmlb:overflow... or even phtmlb:matrix. Fine.

rainer_liebisch
Contributor
0 Kudos

Hi Daniel,

if you want to force the size you can use xhtmlb:overflowContainer. You can set the attribute width, height and mode. With the mode you can decide if you want to cut off the exceeding text or if you want a scrollbar. Please have a look at this extension and press the 'Documentation' button. There are the details.

Regards,

Rainer