Page 1 of 1
Table field: Title Row & no input
Posted: Thu Aug 20, 2020 8:56 pm
by simon.schvartzman
Hi guys, first time working with a Table field and having 2 (very) basic questions:
1 - is it possible to freeze the first row for it to remain fixed as I scroll down the table? How?
2 - On one hand I don't want the table to be editable but on the other I'd like to be able to navigate through all its lines by scrolling up and down. If I set disable to true (no input) then I can't navigate...
What am I missing?
Thanks for your inputs
Re: Table field: Title Row & no input
Posted: Thu Aug 20, 2020 9:33 pm
by dunbarx
Hi.
All doable easily, all kludges.
You cannot "freeze" the first line when scrolling. Overlay a one line table field with all the same text properties as the main one, and load it with line 1. If you do it nicely, the field can stay there all the time and nobody will know the difference.
To allow the main field to scroll and still not be editable requires that you overlay, say a rectangular opaque graphic with its blendLevel set to 100. Again, if done nicely, nobody but you and I would know. You need to leave the vertical scrollBar of the main field exposed.
If you do decide to allow editing, that one line field has to load line 1 into the underlying "main" field. And the overlying graphic has to become not opaque.
All doable...
Craig
Re: Table field: Title Row & no input
Posted: Thu Aug 20, 2020 9:49 pm
by simon.schvartzman
Thanks Craig, I'd consider to file a feature request as both functionalities seem useful to me and should deserve its own property...
Best!
Re: Table field: Title Row & no input
Posted: Thu Aug 20, 2020 10:03 pm
by dunbarx
Simon.
Go ahead, but let me know how the kludges work out...
Craig
Re: Table field: Title Row & no input
Posted: Thu Aug 20, 2020 10:43 pm
by cpuandnet
As dunbarx stated, it can easily be done but it is kludgy. I often use 2 scrolling list fields. One for the header and one for the data. On both fields, set the lock text to true. On the header, turn off the scrollbars. On the data field, set the list behavior property to true. Here is what one of mine looks like after a little lipstick has been applied too.
Re: Table field: Title Row & no input
Posted: Thu Aug 20, 2020 10:59 pm
by simon.schvartzman
@craig & @cpuandnet, your suggestions are fine but things become more complicated if the header is larger than the table width (meaning there are more columns than would fit in the visible field) as is my case, and horizontal scroll is needed as well.
I'm inclined to find another workaround but anyway will submit the feature request
Many thanks for your support.
Re: Table field: Title Row & no input
Posted: Thu Aug 20, 2020 11:24 pm
by dunbarx
Simon, I think the team is not going to commit much to this feature request. Submit anyway, though.
So you are thinking of yet additional kludges? What else would do?
Craig
Re: Table field: Title Row & no input
Posted: Fri Aug 21, 2020 8:36 am
by Thierry
Hi Simon,
May be that you will find useful this excellent tableField from Bernd
called
modTableField.
Here a screenshot:
I have version 0.2.6 and don't know if it's the latest official version.
Kind regards,
Thierry
Re: Table field: Title Row & no input
Posted: Fri Aug 21, 2020 10:12 am
by bn
Hi Simon,
since Thierry mentioned it:
modTableField is a table field with an api, i.e. you can instruct it to do certain things.
If you have ever used tinyDictionary then you have used modTableField.
http://livecodeshare.runrev.com/stack/8 ... Dictionary
It is not as powerful as the datagrid table but still has a lot of features.
It consists of basically two fields (header and content).
But it does have a learning curve.
http://berndniggemann.on-rev.com/modTab ... _3_9_5.zip
Kind regards
Bernd
Re: Table field: Title Row & no input
Posted: Fri Aug 21, 2020 2:05 pm
by simon.schvartzman
Bernd and Thierry many thanks for the hint.
Bernd it seems your modTableField will certainly comply with my requirements. Great job!
BTW, for those interested, I've submitted a feature request to LC and it can be found here
https://quality.livecode.com/show_bug.cgi?id=22874
Cheers...