Search code examples
webosenyo

Trying to make 3 columns of data with equal spacing in Enyo


I have a project I'm working on for enyo, that needs to have 3 column with the following format:

--- date---      ---- message -------      ----- attachments-------

The problem is that each line has a different spacing. So if the first date is 1/2/10012 and the next date is 12/22/2002, the message column will not line up. I've looked into using a slidingPane, but was wondering if there was a more simple way to do it.


Solution

  • I'm not sure if I understand the question fully, but if you want a block of display to contain 3 equally spaced "columns" you can do something like:

    {kind: enyo.VFlexBox, components: [
        {kind: enyo.HFlexBox, flex: 1, align: "center", pack: "center", components: [
            {name: "column1", flex: 1, content: "Column 1"},
            {name: "column2", flex: 1, content: "Column 2"},
            {name: "column3", flex: 1, content: "Column 3"},
        ]}
    ]}