Datagrid Question

2011-09-19 Thread Marty Knapp
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 4 and align itself directly under it so that if a user changes the column w

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

Datagrid question

2011-01-22 Thread Peter Haworth
I've put together a mouseDown handler that displays a stack window immediately below a datagrid column when the user right clicks on that column. Right now it's in the group script of the datagrid. The dg manual says there is a default header behavior property so set that to the id of a butto

Datagrid question

2011-02-02 Thread Peter Haworth
I want to get hold of a couple of datagrid properties in a script that is not in the datagrid group - the dgColumn, dgColumnLabel, and the dgHeaderControl. Not having any luck. About all I've tried is qualifying the property with the ID of the datagrid group but that doesn't work. Any ideas?

Datagrid question

2011-03-23 Thread Klaus on-rev
Hi friends, is it possible to create a datagrid FORM that can act like 2 or more independant "clickable" "Cells?" (separate row "wannabees") in one row? Know what I mean? Something like this mockup: Any hints, tricks, hacks welcome :-) Best Kla

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

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 a

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'l

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 *p

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 specifi

Re: Datagrid Question

2011-09-20 Thread zryip theSlug
On Tue, Sep 20, 2011 at 5:22 AM, Marty Knapp 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 4 and > align itself

Re: Datagrid Question

2011-09-20 Thread zryip theSlug
On Tue, Sep 20, 2011 at 8:22 PM, Marty Knapp 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 property > inspector is i

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 Knapp 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

Re: Datagrid Question

2011-09-20 Thread Pete
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? Pete Molly's Revenge On Tue, Sep 20, 2011 at 11:48 AM, zryip theSlug wrote: > On Tue, Sep 20, 2011 at 8

Re: Datagrid Question

2011-09-20 Thread zryip theSlug
On Tue, Sep 20, 2011 at 9:19 PM, Pete 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 directly affected a contr

Re: Datagrid Question

2011-09-20 Thread 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 to get a handle on this since I couldn't find anything in the datagrid docs about it.

Re: Datagrid Question

2011-09-21 Thread zryip theSlug
On Wed, Sep 21, 2011 at 12:20 AM, Pete 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 to get a > handle on

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 s

A Datagrid question

2010-12-10 Thread william humphrey
If you have a stack with a datagrid and you do this: set the dgFocus of group "mydatagrid" of stack "not_modal" to true Then you can: *set* the dgHilitedLines of *group* "mydatagrid" of stack "not_modal" to 1 and it will be blue and you can then immediately hit a down arrow key and it wi

Re: Datagrid question

2011-01-24 Thread Trevor DeVore
On Sat, Jan 22, 2011 at 4:21 PM, Peter Haworth wrote: > I've put together a mouseDown handler that displays a stack window > immediately below a datagrid column when the user right clicks on that > column. Right now it's in the group script of the datagrid. > The dg manual says there is a defa

Re: Datagrid question

2011-02-02 Thread Trevor DeVore
On Wed, Feb 2, 2011 at 7:41 PM, Peter Haworth wrote: > I want to get hold of a couple of datagrid properties in a script that is > not in the datagrid group - > the dgColumn, and the dgHeaderControl. These properties are usually used within the context of an event such as a mouseClick. The us

Re: Datagrid question

2011-02-03 Thread Peter Haworth
Hi Trevor, Here's an outline of what I'm trying to do. I've used a custom version of the default header behavior to display a popup menu when the user clicks on a datagrid header. That all works fine. When The user selects a menu item from the popup, I have a menuPick handler in the script of

Re: Datagrid question

2011-02-03 Thread Trevor DeVore
On Thu, Feb 3, 2011 at 12:50 PM, Peter Haworth wrote: > Here's an outline of what I'm trying to do. I've used a custom version of > the default header behavior to display a popup menu when the user clicks on > a datagrid header. That all works fine. When The user selects a menu item > from the p

Re: Datagrid question

2011-02-03 Thread Peter Haworth
Thanks Trevor. I just did that very thing as a workaround until I heard back so the workaround now becomes the solution! Pete Haworth http://www.mollysrevenge.com http://www.sonicbids.com/MollysRevenge http://www.myspace.com/mollysrevengeband On Feb 3, 2011, at 10:47 AM, Trevor De

Re: Datagrid question

2011-03-23 Thread zryip theSlug
On Wed, Mar 23, 2011 at 8:58 PM, Klaus on-rev wrote: > Hi friends, Hi Klaus, > is it possible to create a datagrid FORM that can act like 2 or more > independant "clickable" "Cells?" (separate row "wannabees") in one row? Yes > Know what I mean? Something like this mockup: >

Re: Datagrid question

2011-03-24 Thread Klaus on-rev
Hi Zryip, > On Wed, Mar 23, 2011 at 8:58 PM, Klaus on-rev wrote: >> Hi friends, > Hi Klaus, >> is it possible to create a datagrid FORM that can act like 2 or more >> independant "clickable" "Cells?" (separate row "wannabees") in one row? > Yes >> Know what I mean? Something like this mockup: >>

Re: Datagrid question

2011-03-24 Thread Bob Sneidar
Store the currently "selected" object in a property of the datagrid, and every time the selection changes, set the property. Bob On Mar 24, 2011, at 8:52 AM, Klaus on-rev wrote: > But I have ni idea how to "unhilite" the last "cell" when the user click into > another row!? > Know what I mean

Re: Datagrid question

2011-03-24 Thread Klaus on-rev
Hi Bob, > Store the currently "selected" object in a property of the datagrid, and > every time the selection changes, set the property. wonderful, works great! Thanks a lot! > Bob Best Klaus -- Klaus Major http://www.major-k.de kl...@major.on-rev.com _

Re: Datagrid question

2015-04-15 Thread dunbarx
m: William Prothero To: Use-livecode Use-livecode 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 of text, and I won’t be able to edit

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, s

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" wrote: > 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

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 dgHilitedIndexe

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 Home of lcStackBrowser and SQLiteAdmin On Thu, Apr 16, 2015 at 10:23 AM,

Re: Datagrid question

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

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. Can

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 scrollBarD

Re: DataGrid question...

2020-03-24 Thread dunbarx--- via use-livecode
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 that scroll

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 co

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 whate

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 fi

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 limi

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-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
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-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 use-liveco

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 and

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 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 use-liveco

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 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 i

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 could

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 ahsoftw...@

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 < use-livecode@lists.runrev.co

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 colum

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 Thank

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 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: Fields:

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 emb

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 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 displa

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 "seri

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 ga

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 ga

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 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 use-livec

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 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 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 s

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 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 i

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. 4

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 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 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 use-live

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 we

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 of

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 stays

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 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 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

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
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 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 Tweedly

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, LO

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 st

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:" && wor

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 m

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 anything

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-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 anothe

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 slight

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 i

RE: Resizable DataGrid Question

2011-10-19 Thread Mike Doub
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 The selectionchanged message sent to

Re: Resizable DataGrid Question

2011-10-19 Thread Pete
d 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 LiveC

Re: Resizable DataGrid Question

2011-10-19 Thread zryip theSlug
On Wed, Oct 19, 2011 at 10:56 PM, Mike Doub 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 > > > on Fi

RE: Resizable DataGrid Question

2011-10-19 Thread Mike Doub
Nope, same result. Thanks just the same. -= Mike -Original Message- From: use-livecode-boun...@lists.runrev.com [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of Pete Sent: Wednesday, October 19, 2011 5:22 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 11:43 PM, zryip theSlug 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 dgInde

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 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

  1   2   >