Results 1 to 2 of 2

Thread: cWebGrid layout

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Feb 2009
    Location
    The Netherlands
    Posts
    4,670

    Default Re: cWebGrid layout

    The layout model works out a grid of virtual columns based on the column definitions. Then it tries to determine the widths of the virtual columns by looking at the first column that only spans that particular column. If it can't find that column the behavior is pretty much undefined.

    The problem in your layout is the column of row 3, which is smaller than the first column of rows 2, 4 and 5 creating the need for another virtual column. But then there is no column that determines the width of the space left by column 1 of row 3 (see illustration below).

    Row 1 <-------------------------->
    Row 2 <----------->
    Row 3 <----->|***|
    Row 4 <----------> <-----------> <-----------> <------------> <---------->
    Row 5 <----------> <-----------> <-----------> <------------> <---------->

    So you'd need a 'filler column' to define that width. Problem is that columns do not support pbVisible yet. So you can't have a column that is hidden but still occupies its space, that is already logged as a wish (for quite a while actually, I'll see if we can squeeze it into 20).

    Code:
    Object oWebGrid1 is a cWebGrid
        Set piHeight to 400
        Set pbOfflineEditing to True
        Set pbDataAware to False
        
        Object oRow1Col1 is a cWebColumn
            Set psCaption to "column"
            Set piListColSpan to 3                
        End_Object
    
        Object oRow2Col1 is a cWebColumn
            Set psCaption to "column"
            Set pbNewLine to True
            Set piListColSpan to 2
        End_Object
    
        Object oRow3Col1 is a cWebColumn
            Set psCaption to "column"
            Set piWidth to 25
            Set pbNewLine to True
            Set piListColSpan to 1
        End_Object
    
        Object oRow3Fill is a cWebColumn
            Set psCaption to "Filler"
            Set piWidth to 25
            Set piListColSpan to 1
        End_Object
    
        Object oRow4Col1 is a cWebColumn
            Set psCaption to "column"
            Set pbNewLine to True
            Set piListColSpan to 2
        End_Object
    
        Object oRow4Col2 is a cWebColumn
            Set psCaption to "column"
            Set piWidth to 50
        End_Object
    
        Object oRow4Col3 is a cWebColumn
            Set psCaption to "column"
            Set piWidth to 50
        End_Object
    
        Object oRow4Col4 is a cWebColumn
            Set psCaption to "column"
            Set piWidth to 50
        End_Object
    
        Object oRow4Col5 is a cWebColumn
            Set psCaption to "column"
            Set piWidth to 50
        End_Object
        
        Object oRow5Col1 is a cWebColumn
            Set psCaption to "column"
            Set pbNewLine to True
            Set piListColSpan to 2
        End_Object
    
        Object oRow5Col2 is a cWebColumn
            Set psCaption to "column"
        End_Object
    
        Object oRow5Col3 is a cWebColumn
            Set psCaption to "column"
        End_Object
    
        Object oRow5Col4 is a cWebColumn
            Set psCaption to "column"
        End_Object
    
        Object oRow5Col5 is a cWebColumn
            Set psCaption to "column"
        End_Object
    End_Object
    Last edited by Harm Wibier; 20-Jul-2020 at 04:55 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •