Jump to content

Finding which array element has focus


Recommended Posts

Posted

Hello there,

I have an array of clusters, 3 numeric controls per cluster.

I'd like the user to be able to click in one of the numeric controls in one array element then right click and from a context menu choose 'set'. The contents of the active cell will then be replaced with a value I choose.

- Is it possible to find which item in the cluster in which element of the array has focus, ie has the cursor flashing in it?

Thank you for any tips,

Martin

Ahh, just realised it is straight forward - using the ArrElem.Value which is a variant and then using VariantToData to set it to the datatype of my cluster. Bingo.

Thanks,

Martin

  • 4 weeks later...
Posted

You can also use a mouse down event and interrogate that way.

Hello there,

I have an array of clusters, 3 numeric controls per cluster.

I'd like the user to be able to click in one of the numeric controls in one array element then right click and from a context menu choose 'set'. The contents of the active cell will then be replaced with a value I choose.

- Is it possible to find which item in the cluster in which element of the array has focus, ie has the cursor flashing in it?

Thank you for any tips,

Martin

Ahh, just realised it is straight forward - using the ArrElem.Value which is a variant and then using VariantToData to set it to the datatype of my cluster. Bingo.

Thanks,

Martin

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...

Important Information

By using this site, you agree to our Terms of Use.