Hello David, Here is a small code example with 3 grid panels, the canvas in the middle and mouse move handler attached to it:
essai8.adb
Description: Binary data
Note: when you scroll the canvas with mouse wheel then Y coordinate don't change at the opposite of the wanted behavior. What is your feedback? Thanks, Pascal. http://blady.pagesperso-orange.fr Le 23 mars 2015 à 03:09, Rabbi David Botton <[email protected]> a écrit : > I can't make out the picture, it is too small. Would you be able to send me a > small working sample I can debug through? If too difficult I'll try and code > up something like this in the next day or so. > > David Botton > > > On Sun, Mar 22, 2015 at 5:36 AM Pascal <[email protected]> wrote: > Hello David, > > Well, I have created a Grid with three areas (buttons, graphic, text) then a > view inside the graphic area then a canvas then the mouse handler with > calculation: > IntGrid.Create > (IntWindow, > ((1 => Gnoga.Gui.View.Grid.COL), > (1 => Gnoga.Gui.View.Grid.COL), > (1 => Gnoga.Gui.View.Grid.COL))); > <...> > IntGraphView := new Gnoga.Gui.View.View_Type; > IntGraphView.Create (IntGrid.Panel (2, 1).all); > -- Force scrollbar display even not necessary > IntGraphView.Overflow (Gnoga.Gui.Element.Scroll); > -- Force children to fit parent size > IntGraphView.Fill_Parent; > <...> > IntGraphView.On_Mouse_Move_Handler (MEH); > <...> > IntPositionX := Mouse_Event.X - Graph_Canvas.Offset_From_Left; > IntPositionY := Mouse_Event.Y - Graph_Canvas.Offset_From_Top; > > Here is the result, mouse positions are in the GPS log area and recalculated > positions are in the text area: > > > Y position seems to be the grid view position based: roughly 100 + 100 pixels. > Where am I wrong? > > Thanks, Pascal. > http://blady.pagesperso-orange.fr > >> net/_______________________________________________ >> >> Gnoga-list mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/gnoga-list > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming The Go Parallel Website, sponsored > by Intel and developed in partnership with Slashdot Media, is your hub for all > things parallel software development, from weekly thought leadership blogs to > news, videos, case studies, tutorials and more. Take a look and join the > conversation > now.http://goparallel.sourceforge.net/_______________________________________________ > Gnoga-list mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/gnoga-list > <20150322-Mouse > position.png>------------------------------------------------------------------------------ > Dive into the World of Parallel Programming The Go Parallel Website, sponsored > by Intel and developed in partnership with Slashdot Media, is your hub for all > things parallel software development, from weekly thought leadership blogs to > news, videos, case studies, tutorials and more. Take a look and join the > conversation now. > http://goparallel.sourceforge.net/_______________________________________________ > Gnoga-list mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/gnoga-list
------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________ Gnoga-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gnoga-list
