Datagrid question - variable row templates

2020-10-15 Thread David Bovill via use-livecode
It’s been a while since I used data grids - so I’m wondering if there are any new aspects / tricks here that I’m missing. Requirements I need a data grid like object to display json data / an array, in which each item has a type. So type image or type text etc. Each type should be displayed by

Re: DataGrid question: Suggestions for further enhancements

2020-04-03 Thread Niggemann, Bernd via use-livecode
Roland wrote Thu, 02 Apr 2020 04:08:51 -0700: Thank you Roland for your detailed list of possible improvements to modTableField > + Selecting columns: > > marking selected columns I will have to think about that > + Dragging and dropping columns and rows presently it is possible to drag

Re: DataGrid question...

2020-04-03 Thread Niggemann, Bernd via use-livecode
> Bernard Devlin via use-livecode Fri, 03 Apr 2020 11:23:08 -0700 > Reminds me of the work of the late great Eric Chatonet Thanks Bernhard for your kind words. But Eric is in my memory such a super coder and his code was crystal clear. Whereas my code is, um, less so. > I see only one

Re: DataGrid question...

2020-04-03 Thread Bernard Devlin via use-livecode
Hi Bernd Your modTableField is very impressive. Reminds me of the work of the late, great Eric Chatonet (author of many works on Hypercard). I see only one slight problem: after I click into a cell a trace of the I beam is left behind on leaving the cell (this becomes visible on selecting

Re: DataGrid question: Suggestions for further enhancements (Bob Sneidar)

2020-04-03 Thread Bob Sneidar via use-livecode
:-) I wasn’t arguing, just pointing out that before the data grid, the community was practically begging RunRev for some kind of robust table object, BECAUSE the table field was so unwieldy. That others have found ways in the interim to enhance the table field is nothing short of astounding,

Re: DataGrid question: Suggestions for further enhancements (Bob Sneidar)

2020-04-03 Thread R.H. via use-livecode
@ Bob S Sure, you are right that the DG data grid supports most of what users might wish to have. My point was that there is a nice enhancement to the table field from Bernd Niggemann and that it could even be further enhanced -- without arguing about DG vs table field. Even if that would only

Re: DataGrid question: Suggestions for further enhancements

2020-04-02 Thread Paul Dupuis via use-livecode
On 4/2/2020 10:35 AM, Bob Sneidar via use-livecode wrote: As far as I am concerned, datagrids make table fields obsolete. I agree. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage

Re: DataGrid question: Suggestions for further enhancements

2020-04-02 Thread Bob Sneidar via use-livecode
Not to belabor the point, but why would the data grid be overkill in relation to a table field? In what way? Cell editing actually works great. Double click a cell and edit the contents. Finding and getting data is far easier in a data grid than in a table field. dispatch findIndex to group

Re: DataGrid question: Suggestions for further enhancements

2020-04-02 Thread R.H. via use-livecode
@Bernd Niggemann The ModTableField is a great tool when the DG datagrid is an overkill. It works very well for me. Thank you very much for the contribution, dear Bernd. + Selecting columns: What I added was the possibility to also select columns (hilite columns) which is done using an overlay

Re: DataGrid question...

2020-04-01 Thread Bob Sneidar via use-livecode
Hi all. I’m not sure I understand the nature of the problem anymore as the thread is so long, but if you are using the data grid, it is very easy to get the actual index and column number of a cell that has been clicked on. If you put this into your data grid script, you can see it at work.

Re: DataGrid question...

2020-04-01 Thread Niggemann, Bernd via use-livecode
Hello Mike, I cannot reproduce the scrolling nor the failing of reporting. What I did notice is when I changed the size of the field via the mouse in editMode at times switching back to browse mode via command-option-tab the field did not focus when clicking on it and it did not report

Re: DataGrid question...

2020-04-01 Thread Mike Doub via use-livecode
There is an interesting interaction between the scrolling function, the size of the field, mouseUp or Down.  For my test, when I click the 6th column, scrolling occurs and the function returns nothing.  If I size the field such that no scrolling occurs, all works as expected.   If I change the

Re: DataGrid question...

2020-04-01 Thread Niggemann, Bernd via use-livecode
This is a modification of Jaque's script to get the row and column of a locked tableField when the user clicks in a cell. Use tableField whose lockText is true. Set its script to on mouseUp put "Row:" &&

Re: DataGrid question...

2020-03-30 Thread Niggemann, Bernd via use-livecode
>Peter Bogdanoff wrote: >Does anyone have a link to obtain Bernd's modTableField ? Here is a link to the latest version of modifiedTableField berndniggemann.on-rev.com/mtf/modTableField.zip there is a zip of a demo stack with a helper

Re: DataGrid question...

2020-03-30 Thread Curry Kenworthy via use-livecode
Pi: > I’m not sure this is what Curry was thinking of. What do you think > he was eluding to. We’ve ‘known’ this for years now apparently. I love the humor so far - well done, kind of like a skit/spoof of Fake News flailing under the weight of Accurate Facts yet insistently demanding more,

Re: DataGrid question...

2020-03-30 Thread Alex Tweedly via use-livecode
Yeah,  mtfDataItemClicked calls gatherItemClickedInfo to get the info :-) On 30/03/2020 21:07, Jerry Jensen via use-livecode wrote: In modTableField there’s a function for that: mtfDataItemClicked pColumnClicked, pLineClicked, pItemContent, pGroupName On Mar 30, 2020, at 3:49 AM, Alex

Re: DataGrid question...

2020-03-30 Thread Jerry Jensen via use-livecode
I am updating a project that used modTableField. I emailed Bernd to see what the current version is. Its 0.3.3.9 and he emailed it to me. I don’t have a link, but Bernd’s email is: Niggemann, Bernd" I’m a big fan! Jerry Jensen > On Mar 30, 2020, at 1:38 PM, Peter Bogdanoff via use-livecode >

Re: DataGrid question...

2020-03-30 Thread Peter Bogdanoff via use-livecode
Does anyone have a link to obtain Bernd's modTableField ? Peter Bogdanoff > On Mar 30, 2020, at 1:07 PM, Jerry Jensen via use-livecode > wrote: > > In modTableField there’s a function for that: > mtfDataItemClicked pColumnClicked, pLineClicked, pItemContent, pGroupName > >> On Mar 30, 2020,

Re: DataGrid question...

2020-03-30 Thread Jerry Jensen via use-livecode
In modTableField there’s a function for that: mtfDataItemClicked pColumnClicked, pLineClicked, pItemContent, pGroupName > On Mar 30, 2020, at 3:49 AM, Alex Tweedly via use-livecode > wrote: > > I don't know of a simple way to do it. > > However, Bernd's modTableField does do it, and it uses

Re: DataGrid question...

2020-03-30 Thread J. Landman Gay via use-livecode
On 3/30/20 4:08 AM, Pi Digital via use-livecode wrote: So, have we all missed a clever and simple, non convoluted method of telling which cell in a scrollable, non editable table field has been clicked? Even if that cell is empty. The table field is pretty rudimentary and so has limitations.

Re: DataGrid question...

2020-03-30 Thread Pi Digital via use-livecode
Wow, David. Not convoluted at all :) so much easier than data grid. I’m not sure this is what Curry was thinking of. What do you think he was eluding to. We’ve ‘known’ this for years now apparently. Sean Cole Pi Digital > On 30 Mar 2020, at 14:13, David Epstein via use-livecode > wrote: >

Re: DataGrid question...

2020-03-30 Thread David Epstein via use-livecode
This is more or less Jacqueline Gay’s suggestion, but with a couple of wrinkles. You do need to adjust for the horizontal scroll of the field (I’m not sure about borders or margin). And if I am not mistaken sometimes “the tabStops” will not have an entry for each tab, if the column width

Re: DataGrid question...

2020-03-30 Thread Alex Tweedly via use-livecode
I don't know of a simple way to do it. However, Bernd's modTableField does do it, and it uses regular fields, and it's open source - so I took a very quick look there. It's not simple :-) But there's a function 'gatherItemClickedInfo' that (with some modifications) might be the foundation

Re: DataGrid question...

2020-03-30 Thread Pi Digital via use-livecode
Hmm, but if you look back to Curry’s last post he claims regarding table fields, not data grids : >> Working out which cell has been clicked: Sorry, that's not accurate either. >> Yes, we do have that! Also for a long time. Curry is a very reliable and valued source of LC knowledge. So, have

Re: DataGrid question...

2020-03-30 Thread J. Landman Gay via use-livecode
I can't write a test handler right now, but I'm thinking you might be able do something like this: repeat for each item i in the tabstops of the field: if the clickH > i and less than item i+1, that's your column The clickline gives you the row. On 3/29/20 11:04 PM, Terry Judd via

Re: DataGrid question...

2020-03-29 Thread Terry Judd via use-livecode
This is rough but sort of works... on selectionChanged set the itemDel to tab put word 2 of the selectedLine into tRow put word 2 of the selectedChunk into nChar put length(line 1 to tRow-1 of me) into tStart put char tStart+2 to nChar of me into tText put the number of items in

Re: DataGrid question...

2020-03-29 Thread Bob Sneidar via use-livecode
OIC. I was struggling with that earlier today. The problem is, there is no cell. Just a field. You can get the line with the clickLine, but I discovered that even with cell editing on, the table field acted erratically, adding lines when I didn’t want them. Since you know the tabstops, you can

Re: DataGrid question...

2020-03-29 Thread Jerry Jensen via use-livecode
Hi Sean, Sorry, I was thinking you might not need a DG at all. My mistake. Anyway, just to be complete, Bernd’s modTableField API gives you the following: mtfDataItemClicked pColumnClicked, pLineClicked, pItemContent, pGroupName mtfDataItemClicked is send when the user clicks into a data cell.

Re: DataGrid question...

2020-03-29 Thread Pi Digital via use-livecode
Ah Bob. You misunderstand. We are asking in reference to the table field, not DG. Finding the index in data grid is very easy indeed. In a table field, it so much as I was to understand. But apparently there is some magic I’ve missed somewhere and perhaps I’m the only one. Do you know what it

Re: DataGrid question...

2020-03-29 Thread Bob Sneidar via use-livecode
on mouseUp put the mouseControl into tControl put the long id of tControl into tID put the short name of tControl into tName end mouseUp The short name will reveal the column number. The dgHilitedLine will give you the line. > On Mar 29, 2020, at 8:37 PM, Bob Sneidar via use-livecode

Re: DataGrid question...

2020-03-29 Thread Bob Sneidar via use-livecode
The mouseControl! Bob S On Mar 29, 2020, at 8:35 PM, Pi Digital via use-livecode mailto:use-livecode@lists.runrev.com>> wrote: Hi Jerry Thanks for the heads up about Bernd’s code. But I was interested in learning how to get the cell index of a table field when clicked as we are told it was

Re: DataGrid question...

2020-03-29 Thread Pi Digital via use-livecode
Hi Jerry Thanks for the heads up about Bernd’s code. But I was interested in learning how to get the cell index of a table field when clicked as we are told it was solved a ‘long time’ ago. That makes it seem that it is general knowledge and I’m a dunce for not being aware of it (which is very

Re: DataGrid question...

2020-03-29 Thread Pi Digital via use-livecode
Hi Bob That’ll return the field is I’m over but not the cell of the table field. Unless, again, I am mistaken. Am I missing something. Sean Cole Pi Digital > On 30 Mar 2020, at 03:09, Bob Sneidar via use-livecode > wrote: > > The mouseControl. >>> help >> me understand how you work out

Re: DataGrid question...

2020-03-29 Thread Jerry Jensen via use-livecode
Hi Sean, Have you seen Bernd Niggemann’s modTableField? It is built on top of the LC list field, without a lot of the complications of DataGrids if you don’t need DG’s huge capabilities. It might work well for you. Regards, Jerry Jensen > On Mar 29, 2020, at 7:05 PM, Sean Cole (Pi) via

Re: DataGrid question...

2020-03-29 Thread Bob Sneidar via use-livecode
The mouseControl. > On Mar 29, 2020, at 7:06 PM, Sean Cole (Pi) via use-livecode > wrote: > >> >> Working out which cell has been clicked: Sorry, that's not accurate >> either. Yes, we do have that! Also for a long time. >> > > Hi, > > As Curry's now unfortunately out of the conversation,

Re: DataGrid question...

2020-03-29 Thread Sean Cole (Pi) via use-livecode
> > Working out which cell has been clicked: Sorry, that's not accurate > either. Yes, we do have that! Also for a long time. > Hi, As Curry's now unfortunately out of the conversation, can someone else help me understand how you work out which cell has been clicked? He said it can be done but

Re: DataGrid question...

2020-03-29 Thread Sean Cole (Pi) via use-livecode
> > Working out which cell has been clicked: Sorry, that's not accurate > either. Yes, we do have that! Also for a long time. > Hi, As Curry's now unfortunately out of the conversation, can someone else help me understand how you work out which cell has been clicked? He said it can be done but

Re: DataGrid question...

2020-03-29 Thread Curry Kenworthy via use-livecode
Pi: > Fields: Images, yes. Other objects, no. Working out which cell > has been clicked, no. > Is that ‘fake news’? If so, sad face. If not, still sad face. Well, sorry but I have to say YES it's largely fake news! :D I'm ill and no strength for an argument (and BTW it has been a fairly

Re: DataGrid question...

2020-03-29 Thread Richard Gaskin via use-livecode
Bob Sneidar wrote: > I thought you could embed checkboxes in a data grid? A DG is a collection of groups. Anything that can be put into a group can be part of the group that defines the row. > When have we ever been able to embed another object in a field? "Embed"? Never. But we can

Re: DataGrid question...

2020-03-29 Thread scott--- via use-livecode
I have an app I’m working on right now that has check boxes that the user taps in a list field. Swapping the imagesource works really well in this particular case. Not that the dataGrid isn’t the required tool in some cases. Scott Morrow Elementary Software (Now with 20% less chalk dust!) web

Re: DataGrid question...

2020-03-29 Thread Mark Wieder via use-livecode
On 3/29/20 1:50 PM, Curry Kenworthy via use-livecode wrote: Way too much inaccurate info and "fake news" about LiveCode gets propagated I think that's mischaracterized. Just passing on some information (I hate it when someone says x can't be done - that's a real push to do it). I've been

Re: DataGrid question...

2020-03-29 Thread Bob Sneidar via use-livecode
I thought you could embed checkboxes in a data grid? Not in a field of course, but that’s always been the case. When have we ever been able to embed another object in a field? Bob S On Mar 29, 2020, at 4:32 PM, Pi Digital via use-livecode mailto:use-livecode@lists.runrev.com>> wrote:

Re: DataGrid question...

2020-03-29 Thread Pi Digital via use-livecode
Fields: Images, yes. Other objects, no. Working out which cell has been clicked, no. Is that ‘fake news’? If so, sad face. If not, still sad face. > Thanks Mark for catching and correcting that. Way too much inaccurate info > and "fake news" about LiveCode gets propagated, and often picked

Re: DataGrid question...

2020-03-29 Thread Curry Kenworthy via use-livecode
Pi: > The only issue with using a field is you are limited to character > data presentation only. You can’t put inline images, widgets, > checkboxes, etc. Mark: > Now that's just patently not true. No problem with images: > Set the imagesource of char x of field y of this card to tImageID

Re: DataGrid question...

2020-03-27 Thread Mark Wieder via use-livecode
On 3/27/20 11:06 AM, Sean Cole (Pi) via use-livecode wrote: Still, adding images to a field for this kind of purpose is a great shout. Even better if the mouse click handler can determine the column and row, which isn't much of a trick. The row is easy - that's word 2 of the clickline the

Re: DataGrid question...

2020-03-27 Thread Sean Cole (Pi) via use-livecode
Still, adding images to a field for this kind of purpose is a great shout. Even better if the mouse click handler can determine the column and row, which isn't much of a trick. Thanks for the insights. Sean On Thu, 26 Mar 2020 at 22:05, Mark Wieder via use-livecode <

Re: DataGrid question...

2020-03-26 Thread Mark Wieder via use-livecode
On 3/26/20 2:57 PM, Brian Milby via use-livecode wrote: Probably would need to use drawingSvgCompile instead of a widget.  Then you could turn an SVG drawing into an image. Right. But that wouldn't embed the actual widget in the field, just act as a placeholder. -- Mark Wieder

Re: DataGrid question...

2020-03-26 Thread Brian Milby via use-livecode
Probably would need to use drawingSvgCompile instead of a widget.  Then you could turn an SVG drawing into an image. Thanks, Brian On Mar 26, 2020, 5:37 PM -0400, Mark Wieder via use-livecode , wrote: > On 3/24/20 9:17 PM, Pi Digital via use-livecode wrote: > > Oh. Cool. I did not know you

Re: DataGrid question...

2020-03-26 Thread Mark Wieder via use-livecode
On 3/24/20 9:17 PM, Pi Digital via use-livecode wrote: Oh. Cool. I did not know you could do that! Can it do widgets (for svgs) and checkboxes too? Sorry - I missed this earlier. I have faked checkboxes before by exporting snapshots of the checked and unchecked boxes, and then changing the

Re: DataGrid question...

2020-03-26 Thread Paul Dupuis via use-livecode
On 3/26/2020 4:31 PM, zryip theSlug via use-livecode wrote: The "Freeze pane" stack is available here: https://www.aslugontheroad.com/download/category/4-lab It demonstrates how to scroll, select and sort two datagrids synchronizaly.  Thank you. That is really a helpful time saver. All I need

Re: DataGrid question...

2020-03-26 Thread zryip theSlug via use-livecode
The "Freeze pane" stack is available here: https://www.aslugontheroad.com/download/category/4-lab It demonstrates how to scroll, select and sort two datagrids synchronizaly. On Thu, Mar 26, 2020 at 3:55 PM Paul Dupuis via use-livecode wrote: > > On 3/26/2020 9:54 AM, zryip theSlug via

Re: DataGrid question...

2020-03-26 Thread Paul Dupuis via use-livecode
On 3/26/2020 9:54 AM, zryip theSlug via use-livecode wrote: Paul, I have somewhere a stack demonstrating how to use a second datagrid with the columns to freeze and how to synchronize this second datagrid with the main datagrid when the rows are scrolled. If you may interested I can share it.

Re: DataGrid question...

2020-03-26 Thread Matthias Rebbe via use-livecode
Hi Zryip, It would be awesome if you would share it anyway. ;) Regards Matthias Von meinem iPhone gesendet > Am 26.03.2020 um 14:56 schrieb zryip theSlug via use-livecode > : > > Paul, > > I have somewhere a stack demonstrating how to use a second datagrid > with the columns to freeze

Re: DataGrid question...

2020-03-26 Thread zryip theSlug via use-livecode
Paul, I have somewhere a stack demonstrating how to use a second datagrid with the columns to freeze and how to synchronize this second datagrid with the main datagrid when the rows are scrolled. If you may interested I can share it. On Wed, Mar 25, 2020 at 11:07 PM matthias rebbe via

Re: DataGrid question...

2020-03-25 Thread matthias rebbe via use-livecode
Thanks. Matthias > Am 25.03.2020 um 13:34 schrieb Tore Nilsen via use-livecode > : > > What you should look for in the Dictionary is tabAlign > > Tore > >> 25. mar. 2020 kl. 13:32 skrev matthias rebbe via use-livecode >> mailto:use-livecode@lists.runrev.com>>: >> >>> >>> Am 25.03.2020 um

Re: DataGrid question...

2020-03-25 Thread Tore Nilsen via use-livecode
What you should look for in the Dictionary is tabAlign Tore > 25. mar. 2020 kl. 13:32 skrev matthias rebbe via use-livecode > : > >> >> Am 25.03.2020 um 01:26 schrieb Richard Gaskin via use-livecode >> : >> >> Paul Dupuis wrote: >> >>> Has anyone come up with a way to configure a DataGrid

Re: DataGrid question...

2020-03-25 Thread matthias rebbe via use-livecode
> > Am 25.03.2020 um 01:26 schrieb Richard Gaskin via use-livecode > : > > Paul Dupuis wrote: > >> Has anyone come up with a way to configure a DataGrid (LC9) so that >> the left most column remains visible when the other columns are >> scrolled horizontally? >> >> Or is the only way to to do

Re: DataGrid question...

2020-03-24 Thread Pi Digital via use-livecode
Oh. Cool. I did not know you could do that! Can it do widgets (for svgs) and checkboxes too? Sean Cole Pi Digital > On 25 Mar 2020, at 03:56, Mark Wieder via use-livecode > wrote: > > On 3/24/20 6:43 PM, Pi Digital via use-livecode wrote: >> The only issue with using a field is you are

Re: DataGrid question...

2020-03-24 Thread Mark Wieder via use-livecode
On 3/24/20 6:43 PM, Pi Digital via use-livecode wrote: The only issue with using a field is you are limited to character data presentation only. You can’t put inline images, widgets, checkboxes, etc. Now that's just patently not true. No problem with images: Set the imagesource of char x of

Re: DataGrid question...

2020-03-24 Thread Pi Digital via use-livecode
The only issue with using a field is you are limited to character data presentation only. You can’t put inline images, widgets, checkboxes, etc. For HTML5 deployment I’ve ended up reinventing the wheel with a DataGridV3. I’ve gradually even made it quite generic in code so that it handles

Re: DataGrid question...

2020-03-24 Thread Richard Gaskin via use-livecode
Paul Dupuis wrote: > Has anyone come up with a way to configure a DataGrid (LC9) so that > the left most column remains visible when the other columns are > scrolled horizontally? > > Or is the only way to to do this is to have a separate field to the > left of the DataGrid that holds the left

Re: DataGrid question...

2020-03-24 Thread dunbarx--- via use-livecode
e To: How to use LiveCode Cc: Bob Sneidar Sent: Tue, Mar 24, 2020 5:21 pm Subject: Re: DataGrid question... I did something along these lines some time ago. I needed check boxes to the left of a data grid that scrolled with the grid but remained visible. Yes your idea of a second object th

Re: DataGrid question...

2020-03-24 Thread Bob Sneidar via use-livecode
I did something along these lines some time ago. I needed check boxes to the left of a data grid that scrolled with the grid but remained visible. Yes your idea of a second object that scrolls with the data grid is the way to go. There is a message that gets sent to a data grid called

DataGrid question...

2020-03-24 Thread Paul Dupuis via use-livecode
Has anyone come up with a way to configure a DataGrid (LC9) so that the left most column remains visible when the other columns are scrolled horizontally? Or is the only way to to do this is to have a separate field to the left of the DataGrid that holds the left column? Anyone solved this

Re: another datagrid question

2016-03-08 Thread Phil Davis
Thanks guys - Phil -Original Message- From: Phil Davis <rev...@pdslabs.net> To: How to use LiveCode <use-livecode@lists.runrev.com> Sent: Tue, Mar 8, 2016 3:35 am Subject: another datagrid question My DG table doesn't display the data in its first column. I know I've seen this before,

Re: another datagrid question

2016-03-08 Thread Phil Davis
in the past but I could be wrong. Will give it a try anyway. Thanks guys - Phil -Original Message- From: Phil Davis <rev...@pdslabs.net> To: How to use LiveCode <use-livecode@lists.runrev.com> Sent: Tue, Mar 8, 2016 3:35 am Subject: another datagrid question My DG table d

Re: another datagrid question

2016-03-08 Thread Phil Davis
ems like I remember something about that being an issue in the past but I could be wrong. Will give it a try anyway. Thanks guys - Phil -Original Message- From: Phil Davis <rev...@pdslabs.net> To: How to use LiveCode <use-livecode@lists.runrev.com> Sent: Tue, Mar 8, 2016 3:3

Re: another datagrid question

2016-03-08 Thread zryip theSlug
Hi Phil, You can first explore how the data is split in the datagrid internal array. 1. You can use the msg box with this command: send "PrintKeys" to grp "myDataGrid" 2. Or, if you are a DGH user, go to the DGH's properties palette -> "Print keys" topic -> "Show data" Best Regards, On Tue,

Re: another datagrid question

2016-03-08 Thread dunbarx
Hi. Have you done a "dispatch resetList to group yourDG?" -Original Message- From: Phil Davis <rev...@pdslabs.net> To: How to use LiveCode <use-livecode@lists.runrev.com> Sent: Tue, Mar 8, 2016 3:35 am Subject: another datagrid question My DG table doesn't d

another datagrid question

2016-03-08 Thread Phil Davis
My DG table doesn't display the data in its first column. I know I've seen this before, and may have even fixed it for a client ages ago. But I'm drawing a blank. Using the property inspector, I can see the data in column 1. It's there. The column is displayed, but it appears to be empty.

Re: Datagrid question

2015-04-16 Thread Peter Haworth
You need to dispatch or send the setDataOfIndex to the datagrid. Pete lcSQL Software On Apr 15, 2015 9:59 PM, William Prothero proth...@earthednet.org wrote: Thanks! Worked like a charm. Now I suppose, to get it back in the data grid cell, it’s: local savedColumnINdex,savedRowIndex —saved

Re: Datagrid question

2015-04-16 Thread Peter Haworth
setDataOfIndex doesn't redraw the datagrid. Add a call to RefreshIndex after your setDataOfIndex. Pete lcSQL Software http://www.lcsql.com Home of lcStackBrowser http://www.lcsql.com/lcstackbrowser.html and SQLiteAdmin http://www.lcsql.com/sqliteadmin.html On Thu, Apr 16, 2015 at 10:23 AM,

Re: Datagrid question

2015-04-16 Thread William Prothero
I’m missing something. I have the script, in the datagrid group script: local savedRowIndex, savedColumnIndex —this works as expected on mouseDown put the dgHilitedIndexes of me into savedRowIndex put the dgColumn of the target into savedColumnIndex put getDataOfIndex(the

Re: Datagrid question

2015-04-16 Thread William Prothero
Got it! Thanks! Bill On Apr 16, 2015, at 10:53 AM, Peter Haworth p...@lcsql.com wrote: RefreshIndex ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription

Datagrid question

2015-04-15 Thread William Prothero
I’m trying to set up the dataGrid to put the cell contents in another field, for editing, when I click on it. Some of the cells may contain a fair amount of text, and I won’t be able to edit it in the cell itself. The tutorials refer to the revDataGridLibrary. Can’t find it. Or could the

Re: Datagrid question

2015-04-15 Thread William Prothero
Thanks! Worked like a charm. Now I suppose, to get it back in the data grid cell, it’s: local savedColumnINdex,savedRowIndex —saved from command that loaded the data from the cell into the field. on mouseUp put fld “editedCellContents” into myEditedData setDataOfIndex(savedRowIndex,

Re: Datagrid question

2015-04-15 Thread dunbarx
proth...@earthednet.org To: Use-livecode Use-livecode use-livecode@lists.runrev.com Sent: Wed, Apr 15, 2015 7:58 pm Subject: Datagrid question I’m trying to set up the dataGrid to put the cell contents in another field, for editing, when I click on it. Some of the cells may contain a fair amount

Re: Resizable DataGrid Question

2011-10-24 Thread zryip theSlug
On Thu, Oct 20, 2011 at 12:34 AM, Mike Doub m...@doub.com wrote: I am not sure that you can assume that the indexes always going to correspond to the display order. This is why I decided to use dgIndex function as it returns the indexes in the display order. I do plan on having multiple

Re: Resizable DataGrid Question

2011-10-24 Thread Bob Sneidar
I am a little bit fuzzy as to why you cannot use the dgindex without the math? Why get the dgIndexes and subtract 1 from the offset? It seems the only reason your code works is by happy chance. It just so happens that subtracting 1 from the offset gives you the correct index number in this

Re: Resizable DataGrid Question

2011-10-24 Thread zryip theSlug
On Mon, Oct 24, 2011 at 8:16 PM, Bob Sneidar b...@twft.com wrote: I am a little bit fuzzy as to why you cannot use the dgindex without the math? Why get the dgIndexes and subtract 1 from the offset? It seems the only reason your code works is by happy chance. It just so happens that

Re: Resizable DataGrid Question

2011-10-20 Thread Trevor DeVore
On Wed, Oct 19, 2011 at 4:56 PM, Mike Doub m...@doub.com wrote: on FillInData pDataArray set the text of field Name of me to pDataArray[LastName] \ comma space pDataArray[FirstName] space pDataArray[MiddleName] put char 1 of fld Name of me into field spacerLable of me put

RE: Resizable DataGrid Question

2011-10-20 Thread Mike Doub
Subject: Re: Resizable DataGrid Question On Wed, Oct 19, 2011 at 4:56 PM, Mike Doub m...@doub.com wrote: on FillInData pDataArray set the text of field Name of me to pDataArray[LastName] \ comma space pDataArray[FirstName] space pDataArray[MiddleName] put char 1 of fld Name of me

RE: Resizable DataGrid Question

2011-10-19 Thread Mike Doub
Sent: Tuesday, October 18, 2011 3:29 PM To: How to use LiveCode Subject: Re: Resizable DataGrid Question The selectionchanged message sent to the datagrid includes the index of the current and previous selected datagrid rows as parameters. I'm not sure if that will help though, since this happens

Re: Resizable DataGrid Question

2011-10-19 Thread Pete
a difference end if end if end FillInData -Original Message- From: use-livecode-boun...@lists.runrev.com [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of Pete Sent: Tuesday, October 18, 2011 3:29 PM To: How to use LiveCode Subject: Re: Resizable DataGrid Question

Re: Resizable DataGrid Question

2011-10-19 Thread zryip theSlug
On Wed, Oct 19, 2011 at 10:56 PM, Mike Doub m...@doub.com wrote: I believe that I have found a way to get the previous grid item, but I must have the syntax incorrect for getting the dgIndex of me.   Nothing is being returned.  Can any DataGrid experts give me any guidance? Thanks   Mike

Re: Resizable DataGrid Question

2011-10-19 Thread zryip theSlug
On Wed, Oct 19, 2011 at 11:43 PM, zryip theSlug zryip.thes...@gmail.com wrote: on FillInData pDataArray   put pDataArray[LastName] \      comma space pDataArray[FirstName] space      pDataArray[MiddleName] into tCurrentName   set the text of field Name of me to tCurrentName   put the

RE: Resizable DataGrid Question

2011-10-19 Thread Mike Doub
, October 19, 2011 5:44 PM To: How to use LiveCode Subject: Re: Resizable DataGrid Question On Wed, Oct 19, 2011 at 10:56 PM, Mike Doub m...@doub.com wrote: I believe that I have found a way to get the previous grid item, but I must have the syntax incorrect for getting the dgIndex of me

DataGrid Question

2011-10-18 Thread mikedoub
I am trying to build a contact list with a datagrid with a spacer bar between each alphabetic group of names. I was thinking to use the non-fixed length attribute of the data grid and adjust the size and make the spacer visible in the LayoutControl handler. Does anyone have an example as to

Resizable DataGrid Question

2011-10-18 Thread Mike Doub
I am trying to use a DataGrid to create a contact list that has a spacer between each alphabetic grouping of names. I was thinking to use the non-fixed length attribute of the DataGrid and adjust the size dynamically in the LayoutControl handler as well as showing a field that would contain the

Re: Resizable DataGrid Question

2011-10-18 Thread Pete
The selectionchanged message sent to the datagrid includes the index of the current and previous selected datagrid rows as parameters. I'm not sure if that will help though, since this happens outside of the custom behavior where the LayoutControl handler sits. Another way might be to store the

Re: Datagrid Question

2011-09-21 Thread zryip theSlug
On Wed, Sep 21, 2011 at 12:20 AM, Pete p...@mollysrevenge.com wrote: Hi Pete, Thanks for explanation.  So if I have set a column to be non-editable and I create a custom behavior for it, it will become editable?  How about if the datagrid itself has been set to be non-editable?  Just trying

Re: Datagrid Question

2011-09-20 Thread Pete
Hi Marty, Best I can think of is to get the dgProps[column widths] property of the datagrid. It contains a comma-delimited list of the widths of the columns so by adding up the first 3 items of the list, you'll get the left edge of the 4th column, and adding the first 4 items of that list, you'll

Re: Datagrid Question

2011-09-20 Thread Marty Knapp
Thanks Pete, I have very limited experience with datagrids. What message is sent when the user resizes a column? Where in the datagrid would I place my script - in the group script? Thanks, Mart K Hi Marty, Best I can think of is to get the dgProps[column widths] property of the datagrid.

Re: Datagrid Question

2011-09-20 Thread Pete
PS to my other post. I found am much better way to do this. First, set up a custom behavior for your column 4. Then in the LayoutControl handler of the custom behavior, add the following code: *put* the rectangle of field Total into myRect *put* item 1 of pcontrolRect into item 1 of myRect

Re: Datagrid Question

2011-09-20 Thread Pete
Hi Marty, Just posted a more specific way to do this using the LayoutControl handler of the datagrid's custom behavior. If you're not familiar with setting up custom behaviors: - go to the Columns tab of the inspector for the datagrid - highlight your column 4 - click the plus sign at the bottom

Re: Datagrid Question

2011-09-20 Thread Marty Knapp
That seems to work great Pete. I've now lost the right alignment of the column - it's reverted back to left. I see that there's a dgColumnAlignment but I'm not figuring out how to make that work. The setting in the property inspector is ignored . . . Marty Hi Marty, Just posted a more

Re: Datagrid Question

2011-09-20 Thread zryip theSlug
On Tue, Sep 20, 2011 at 5:22 AM, Marty Knapp martykn...@comcast.net wrote: I have a datagrid with several columns, column 4 of which contains a number. Under the datagrid I have placed a field that keeps a total of the values in this column. I would like this field to match the width of column

Re: Datagrid Question

2011-09-20 Thread zryip theSlug
On Tue, Sep 20, 2011 at 8:22 PM, Marty Knapp martykn...@comcast.net wrote: That seems to work great Pete. I've now lost the right alignment of the column - it's reverted back to left. I see that there's a dgColumnAlignment but I'm not figuring out how to make that work. The setting in the

Re: Datagrid Question

2011-09-20 Thread Marty Knapp
Thanks zryip! That did the trick. Thanks to Pete as well. I appreciate you guys helping me out with this. Marty K On Tue, Sep 20, 2011 at 8:22 PM, Marty Knappmartykn...@comcast.net wrote: That seems to work great Pete. I've now lost the right alignment of the column - it's reverted back to

Re: Datagrid Question

2011-09-20 Thread zryip theSlug
On Tue, Sep 20, 2011 at 9:19 PM, Pete p...@mollysrevenge.com wrote: Thanks zryip, that does fix the problem.  But I have to say that it seems really cumbersome to have to do this.  Does it apply to any properties of the column? Hi Pete, - The dgColumnAlignment is a column property which

  1   2   >