Skip to Content

htmlb:gridLayout with equally-sized cells

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).

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Aug 18, 2004 at 02:28 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • <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"

      Docs on PHTMLB and XHTMLB

      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

  • Aug 18, 2004 at 01:05 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 18, 2004 at 01:10 PM

    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>
    

    Add comment
    10|10000 characters needed characters exceeded