Jump to content

Accessing the UniStringGrid from the JavaScript mousemove event handler


svenke

Recommended Posts

I'm evaluating uniGui compared to TMS Core.

I want to color the cells in the string grid from the mousemove event handler.

How do I do that and where is the documentation for the string grids java script functions.

Sincerely,

Sven

 

Link to comment
Share on other sites

There was nothing in the GridCellStyle example that showed how to do what I want.

As I said before,  I want to color the cells in the stringgrid when the mouse passes over them when the left mouse button is pressed.

This must be done in the JavaScipt event handler  "mousemove".

How do I access the grid from the event handler and what functions are available in the event handler to access the grid and where are they documented.

 

What I need:

1. Accessing the grid.

2. Accessing the current cell below the mouse pointer.

3. Be able to check if the left mouse button is pressed.

 

Link to comment
Share on other sites

6 hours ago, svenke said:

There was nothing in the GridCellStyle example that showed how to do what I want.

As I said before,  I want to color the cells in the stringgrid when the mouse passes over them when the left mouse button is pressed.

This must be done in the JavaScipt event handler  "mousemove".

How do I access the grid from the event handler and what functions are available in the event handler to access the grid and where are they documented.

 

What I need:

1. Accessing the grid.

2. Accessing the current cell below the mouse pointer.

3. Be able to check if the left mouse button is pressed.

UniStringGrid.ClientEvents.ExtEvents ->

function cellclick(sender, td, cellIndex, record, tr, rowIndex, e, eOpts)
{
    if (e.button == 0) {
        td.style.color = 'green'
    }
}

 

Link to comment
Share on other sites

21 minutes ago, svenke said:

I need to do it from the event handler "movemouse".

 

On 7/21/2020 at 11:08 PM, Sherzod said:

3. Be able to check if the left mouse button is pressed.

Sorry, your requests contradict with each other, don't they ?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...