Scrolling a datagrid - Form

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
mvillion
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 107
Joined: Sun Feb 24, 2013 12:29 pm

Scrolling a datagrid - Form

Post by mvillion » Mon Jul 02, 2018 5:29 pm

Hi
I guess I am lazy because LC handles so many things up to now.

I have created a data grid form and the vertifcal scroll bar is visible but moving it up an down only slides the bar - the data in the grid does not slide with it.

I have looked through the tutorials and there was nothing I could see about this. The forum did have one entry with a large amount of code but that was from 2014. So I wondered whether things have moved on, or do I have a stack of code to write.

Thanks
Matt

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9361
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Scrolling a datagrid - Form

Post by richmond62 » Mon Jul 02, 2018 7:14 pm

Well, to be honest, I've never worked with Data Grids . . .

But, just now I set up a very simple one containing a simple list and I had absolutely no problem whatsoever with vertical scrolling.

LiveCode 8.1.10, Macintosh MacOS 10.7.5
-
Gridlock.png
-
Gridlock.livecode.zip
Here's the stack.
(4.58 KiB) Downloaded 202 times

mvillion
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 107
Joined: Sun Feb 24, 2013 12:29 pm

Re: Scrolling a datagrid - Form

Post by mvillion » Mon Jul 02, 2018 8:12 pm

Hi Yes. A data grid is easy to work with as a list.
If you switch it to 'Form' mode and things change.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9361
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Scrolling a datagrid - Form

Post by richmond62 » Tue Jul 03, 2018 8:16 am

Aye, well, the hale thing's awa wi the faeries as far as I can tell.

When I changed my "Gridlock" from a table to a form all my data became invisible
(although I could see it in the props palette),

and when I changed it back to a table the data did NOT reappear
(although I could see it in the props palette),

which is Utter Rubbish!

LiveCode 8.1.10, Xubuntu Linux 18.04

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7227
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Scrolling a datagrid - Form

Post by jacque » Tue Jul 03, 2018 7:55 pm

and when I changed it back to a table the data did NOT reappear
(although I could see it in the props palette),

which is Utter Rubbish!
I think if you work with datagrids more you'll understand why this happens. Forms and table datagrids are very different animals. I wouldn't expect them to share content.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

mvillion
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 107
Joined: Sun Feb 24, 2013 12:29 pm

Re: Scrolling a datagrid - Form

Post by mvillion » Thu Jul 05, 2018 5:14 pm

Hi all

An update.
I shut the computer down. Restarted everything and it is working now.
No idea.

I needed to take a Dogbert approach.
Attachments
dt990804dhc0.gif

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9361
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Scrolling a datagrid - Form

Post by richmond62 » Thu Jul 05, 2018 5:54 pm

I think if you work with datagrids more you'll understand why this happens. Forms and table datagrids are very different animals.
Might it not be a good thing then to have 2 icons on the tools.rev palette:

1. for a datagrid table, and

2. for a datagrid form,

because, if they really are quite different BEASTS . . . the current situation does
. . . err . . . give the impression they are varaints of the same thing and both "benign vegetarians".

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9361
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Scrolling a datagrid - Form

Post by richmond62 » Thu Jul 05, 2018 5:59 pm

OR . . . putting things another way . . .

when I change my datagrid over from table to form how do
I get the data I entered while the thing was in table form
to reappear in the form format?

Klaus
Posts: 13823
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Scrolling a datagrid - Form

Post by Klaus » Thu Jul 05, 2018 7:04 pm

richmond62 wrote:
Thu Jul 05, 2018 5:59 pm
when I change my datagrid over from table to form how do
I get the data I entered while the thing was in table form
to reappear in the form format?
Voodoo and/or prayer and lots of luck. :D

Seriously, you can't.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7227
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Scrolling a datagrid - Form

Post by jacque » Thu Jul 05, 2018 8:33 pm

You will need to do some scripting and adjust the default handlers in the datagrid form. The list datagrid is fairly simple and self-contained, the form datagrid must be fully managed by script and the template has to be manualliy constructed. Look at some of the online lessons.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Simon Knight
Posts: 854
Joined: Wed Nov 04, 2009 11:41 am
Location: Gunthorpe, North Lincs, UK

Re: Scrolling a datagrid - Form

Post by Simon Knight » Sun Sep 06, 2020 3:11 pm

Bump!

Thank you dogbert! Just spent a wee while wondering why the scroll bar did very little. Quit and restart and all is well.

TVM

Skids
best wishes
Skids

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”