Transparent Tableview

Hello,

Sorry for the probably elementary question, but I couldn’t find an example or the delegated option in the tableview widget library…

How do you make a tableview completely transparent, except for row content obiviously and row separation lines??

I’d like to have the background of my app visible…

Thanks!

hi @akak

Try this

-- completely hides background local tableView = widget.newTableView { . . hideBackground = true, . . } --or if you want to have a bit transparency. --.5 is your alpha settings local tableView = widget.newTableView { . . backgroundColor = { 1,1,1,.5}, . . }

Good Luck!

burhan

Worked,

thanks a lot Burhan !

hi @akak

Try this

-- completely hides background local tableView = widget.newTableView { . . hideBackground = true, . . } --or if you want to have a bit transparency. --.5 is your alpha settings local tableView = widget.newTableView { . . backgroundColor = { 1,1,1,.5}, . . }

Good Luck!

burhan

Worked,

thanks a lot Burhan !

This did not work for me in the windows simulator so I assume the device as well.

  1. this is how I got it to work, hide the background.

    tableView = widget.newTableView
    {
        left = 0,
        top = 300,
        height = appGlobals.screenWidth-75,
        width = appGlobals.screenWidth,
        isBounceEnabled = false,
        hideBackground = true,      
        backgroundColor = { 0.8, 0.8, 0.8 },
        onRowRender = onRowRender,
        onRowTouch = onRowTouch,
        listener = tableViewListener,
    }

  1. set the alpha on the row color

rowColor = { default={ 1, 1, 1, 0.2 }, over={ 1, 0.5, 0, 0.2 } },

        tableView:insertRow(
        {
            fontSize = 85,
            isCategory = false,
            rowHeight = 150,
            rowColor = { default={ 1, 1, 1, 0.2 }, over={ 1, 0.5, 0, 0.2 } },
            lineColor = { 0.5, 0.5, 0.5 },
            params = {catName = “” … categories[i].name},  – Include custom data in the row

        })

Happy App Building.

This did not work for me in the windows simulator so I assume the device as well.

  1. this is how I got it to work, hide the background.

    tableView = widget.newTableView
    {
        left = 0,
        top = 300,
        height = appGlobals.screenWidth-75,
        width = appGlobals.screenWidth,
        isBounceEnabled = false,
        hideBackground = true,      
        backgroundColor = { 0.8, 0.8, 0.8 },
        onRowRender = onRowRender,
        onRowTouch = onRowTouch,
        listener = tableViewListener,
    }

  1. set the alpha on the row color

rowColor = { default={ 1, 1, 1, 0.2 }, over={ 1, 0.5, 0, 0.2 } },

        tableView:insertRow(
        {
            fontSize = 85,
            isCategory = false,
            rowHeight = 150,
            rowColor = { default={ 1, 1, 1, 0.2 }, over={ 1, 0.5, 0, 0.2 } },
            lineColor = { 0.5, 0.5, 0.5 },
            params = {catName = “” … categories[i].name},  – Include custom data in the row

        })

Happy App Building.