Disappearing datagrid headers

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
leston12
Posts: 25
Joined: Thu Mar 28, 2013 8:25 pm

Disappearing datagrid headers

Post by leston12 » Wed May 29, 2013 10:22 pm

I have a couple of cards with datagrids on them to show data from a SQLite table in my application. They work great. However ...

When I run the app on my Android device the header text for the datagrid columns are empty. The header IS shown, but without the columns labels. They show as they should on Mac and Win. So I'm stumped as to why they are missing on Android.

In an earlier version of my app I know that the column headers WERE showing, but now they are not. So I re-created the DGs but that did not fix it.

Can anyone give me an idea of how to fix this?

TIA.
Leston

leston12
Posts: 25
Joined: Thu Mar 28, 2013 8:25 pm

Re: Disappearing datagrid headers

Post by leston12 » Wed May 29, 2013 11:26 pm

I figured it out.

After reading this on the LiveCode Lessons about DataGrids ...

"Don't try to draw a Data Grid on a card that Is not open

When a Data Grid renders it dynamically creates fields and accesses certain properties. Some of these properties can not be properly reported by the Revolution engine unless the field is on an open card."

... I realized that I had changed the way I was sizing controls to fit the screen size. I was sending a message to the card without being on the card, which handler included resizing and setting some properties of the DataGrid control. So I modified my code to move to the card before resizing and placing the controls.

After doing that, the header text appeared as it should.
Leston

Post Reply