Re: SVG IDs in Listbox Cells

2018-08-15 Thread Cannon Smith via 4D_Tech
Hi Arnaud, No, I’m manipulating the picture directly inside the list box. Not as efficient as I like and I haven’t tried Miyako’s latest suggestion which might be more efficient, but the whole process only takes 1-2 milliseconds interpreted, so fast enough. Here is more of the code (I’ve left

Re: SVG IDs in Listbox Cells

2018-08-15 Thread Arnaud de Montard via 4D_Tech
> Le 15 août 2018 à 16:21, Cannon Smith via 4D_Tech <4d_tech@lists.4d.com > > a écrit : > > LISTBOX GET CELL COORDINATES Hi Cannon, I'm afraid I had not seen this command exists since v14r5 - I must get old and blind. Thanks for better code :-) BTW, it seems

Re: SVG IDs in Listbox Cells

2018-08-15 Thread Cannon Smith via 4D_Tech
Hi Arnaud, Thanks for those. I ended up doing it in a pretty simple way. Basically, in the list box On Mouse Move event: GET MOUSE($lMouseX;$lMouseY;$lMouseButton) LISTBOX GET CELL POSITION(lbRanchMetrics;$lMouseX;$lMouseY;$lCol;$lRow) If ($lRow>0) LISTBOX GET CELL

Re: SVG IDs in Listbox Cells

2018-08-15 Thread Cannon Smith via 4D_Tech
Thanks, Jim. I have this working now, basically doing what you described. -- Cannon.Smith Synergy Farm Solutions Inc. Hill Spring, AB Canada 403-626-3236 > On Aug 15, 2018, at 3:36 AM, jim.dorrance--- via 4D_Tech > <4d_tech@lists.4d.com> wrote: > > I think there is an example of that on my

Re: SVG IDs in Listbox Cells

2018-08-15 Thread Cannon Smith via 4D_Tech
Yes, this does work perfectly. Thanks. -- Cannon.Smith Synergy Farm Solutions Inc. Hill Spring, AB Canada 403-626-3236 > On Aug 14, 2018, at 6:15 PM, Keisuke Miyako via 4D_Tech > <4d_tech@lists.4d.com> wrote: > > the command > >

Re: SVG IDs in Listbox Cells

2018-08-15 Thread Arnaud de Montard via 4D_Tech
> Le 15 août 2018 à 11:36, jim.dorrance--- via 4D_Tech <4d_tech@lists.4d.com> a > écrit : > > [...] calculate the scrollbar positions and find the cell. 2 methods (c4d format) for that…

Re: SVG IDs in Listbox Cells

2018-08-15 Thread jim.dorrance--- via 4D_Tech
Hi, I think there is an example of that on my website,In a demo to do database. There is an SVG area over a list box and when the most moves I get the coordinates, calculate the scrollbar positions and find the cell. I then find the data associated with the hovered cell, clear whatever elements

Re: SVG IDs in Listbox Cells

2018-08-14 Thread Keisuke Miyako via 4D_Tech
the SVG component commands are essentially DOM wrappers, it feels like an overkill to parse the XML just to get a handle on the xml:id. (don't forget to close/clear the reference $svg. alternatively you could use the "own" option) maybe you could have an invisible or size 0 picture object on

Re: SVG IDs in Listbox Cells

2018-08-14 Thread Keisuke Miyako via 4D_Tech
the command http://doc.4d.com/4Dv17/4D/17/LISTBOX-GET-CELL-COORDINATES.301-3730216.en.html should be useful to place a picture object exactly over a listbox cell. http://download.4d.com/Demos/4D_v15/HDI/GetListboxCoordinates.zip but there might be negative sides effects, such as the mouse roll

Re: SVG IDs in Listbox Cells

2018-08-14 Thread John J Foster via 4D_Tech
Hi Cannon, Yep, that’s what I was thinking. Just need a bit of scaffolding. Just needs to be handle indirectly and not in the cell. And what then what Keith said should make it able to manipulate the DOM and then do whatever you need. I thought the idea was doable. Cool! John… > It is

Re: SVG IDs in Listbox Cells

2018-08-14 Thread Cannon Smith via 4D_Tech
Hi Keith, I just tried a little test and, yes, it does seem to work. I’ll play with this some more and see if all the parts will come together. Thanks! -- Cannon.Smith Synergy Farm Solutions Inc. Hill Spring, AB Canada 403-626-3236 > On Aug 14, 2018, at 8:52 AM, Keith Culotta via 4D_Tech

Re: SVG IDs in Listbox Cells

2018-08-14 Thread Keith Culotta via 4D_Tech
Can you then $svg:=SVG_Open_picture (agRM_Graph{1}) $ref:=SVG_Find_ID ($svg;"Value1") SVG_SET_ATTRIBUTES ($ref;"fill-opacity";"1";"stroke-opacity";"1") agRM_Graph{1}:=SVG_Export_to_picture ($svg) ? Keith - CDI > On Aug 14, 2018, at 9:40 AM, Cannon Smith via 4D_Tech <4d_tech@lists.4d.com> >

Re: SVG IDs in Listbox Cells

2018-08-14 Thread Cannon Smith via 4D_Tech
Thanks for everyone who commented on this. It is actually _almost_ doable. With some math it is possible to figure out where the cursor is over a particular picture cell and "SVG Find element ID by coordinates” works in this context. For example: $tID:=SVG Find element ID by

Re: SVG IDs in Listbox Cells

2018-08-14 Thread John J Foster via 4D_Tech
Hi Miyako, I was thinking of something more dynamic (and a bit more work). But if anyone would know it would be El Miyako. Thanks, John… > the corroboration between form events (mouse, move, enter, leave, click, > double click) and SVG elements, > as well as automatic update of MOUSEX and

Re: SVG IDs in Listbox Cells

2018-08-13 Thread Keisuke Miyako via 4D_Tech
moreover, commands such as SVG GET/SET ATTRIBUTES, which are closely associated with ID based SVG manipulation, requires an object name or variable, but a cell inside a listbox are not accessible that way. 2018/08/14 7:11、Keisuke Miyako via 4D_Tech

Re: SVG IDs in Listbox Cells

2018-08-13 Thread Keisuke Miyako via 4D_Tech
I tend to disagree. the corroboration between form events (mouse, move, enter, leave, click, double click) and SVG elements, as well as automatic update of MOUSEX and MOUSEY system variables, are unique to picture objects. one can display pictures (SVG or not) in a listbox cell, but I do not

Re: SVG IDs in Listbox Cells

2018-08-13 Thread Arnaud de Montard via 4D_Tech
> Le 13 août 2018 à 19:01, Cannon Smith via 4D_Tech <4d_tech@lists.4d.com> a > écrit : > > You know how you can give SVG elements IDs and then use SVG Find element ID > by coordinates during a click or mouse over event to figure out what element > the mouse is over in an SVG picture? I’d like