datagrid on substack - no labels
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
datagrid on substack - no labels
I have a problem where the column labels on a datagrid in a substack are missing. In this screenshot, the upper two windows are in LiveCode and the lower two windows are from the compiled application. Notice that the LiveCode window labeled "Data" looks fine, but the app version of the "Data" window is missing the column labels. Any idea how to get them back?
Re: datagrid on substack - no labels
Update-
This problem is somewhat platform dependent. On a PC, the executable shows the Var1 and Var2 columns labeled correctly, but the Time column still has no label.
This problem is somewhat platform dependent. On a PC, the executable shows the Var1 and Var2 columns labeled correctly, but the Time column still has no label.
Re: datagrid on substack - no labels
Actually the problem is not platform dependent. The nature of the labels depends on whether or not the "Data" window is opened before or after the data is changed.
And therein may lie the heart of the problem, since the LiveCode hints state-
Update 2-
And therein may lie the heart of the problem, since the LiveCode hints state-
Update 2-
Re: datagrid on substack - no labels
and the solution is.........
Place the following code on the stack script of the main stack. This immediately opens the substack where the datagrid will be created, and then makes the substack invisible. When you later want to see the substack, just make it visible. Now the datagrid labels appear correctly in the window of the subscript.
on openStack
go to "dataStack"
go to "mainStack"
set the visible of stack "dataStack" to false
end openStack
Place the following code on the stack script of the main stack. This immediately opens the substack where the datagrid will be created, and then makes the substack invisible. When you later want to see the substack, just make it visible. Now the datagrid labels appear correctly in the window of the subscript.
on openStack
go to "dataStack"
go to "mainStack"
set the visible of stack "dataStack" to false
end openStack
Re: datagrid on substack - no labels
or more elegantly still,
on openStack
go invisible to "dataStack" -- this window must be open (though invisible) for the dataGrid to appear correctly
end openStack
on openStack
go invisible to "dataStack" -- this window must be open (though invisible) for the dataGrid to appear correctly
end openStack
-
- Livecode Opensource Backer
- Posts: 89
- Joined: Mon Jul 19, 2010 6:59 am
- Location: Illinois, USA
Re: datagrid on substack - no labels
Couldn't you just:
Then you don't have to set it invisible?
Code: Select all
on openStack
start using stack "dataStack"
end openStack
Re: datagrid on substack - no labels
That would make the datagrid work correctly, but the dataStack is an optional window that many users will not want to see. So there is a menu item that lets the user open the dataStack window when needed.
I guess my post would have been more clear if I had mentioned that.
I guess my post would have been more clear if I had mentioned that.