04-02-2014 08:31 AM
Hello,
I look for a way to simulate a mouse click on a control (color numeric).
Has anybody an idea?
04-02-2014 09:03 AM
04-02-2014 09:07 AM
Hello,
1) I don't know how to simulate a mouse click.
2) What do you mean by simulate, do you want to have a mouse event in your callback routine (possible) or do you want the color numeric to change its color? The latter you can achieve also using the keyboard, so in this case you could 'replace/simulate' a mouse with the keyboard
04-02-2014 10:04 AM
Thanks for all of you.
In fact I need to put a color numeric in a table but it seems to be impossible. So, I have made a new panel whith only a numeric control. When I clic in a certain cell of my table , I load this small panel at the position where I've clicked but I would like my color numeric to be programmatically open like by clicking on it.
I hope it's clear...
04-03-2014 06:01 AM
Hello Domp,
I think you can call the code that loads the small panel from wherever you want. You don't have to simulate a click, you can call the code or function that loads the panel instead.
Does that make sense? If not, maybe attaching a project would help us determine exactly the situation you're into.
Best regards,
= Nelu F. || National Instruments.
04-03-2014 06:39 AM
Hello Neluf,
Yes I know I can call the code that loads panel wherever I want. But if I want to simulate a click it's to expand the color numeric control placed in this this panel whithout having to click on it. By this way, the user must have the impression to click directly on a color numeric like if it was a natural part of the table.
You could see what I mean whith this screenshot. (The black control is my table).
Best regards.
04-03-2014 07:18 AM
In that case, wouldn't Wolfgang's post help?
04-03-2014 10:13 AM
No sorry, every help is welcome.
04-04-2014 06:01 AM
Basically the solution is to fake a space press on the color numeric, which opens the color map section of the control.
I was just making up a small example on how to do this while I realized that an example shipped with CVI does exactly what you are trying to do: take a look at gridview example in <cvidir>\samples\userint folder on your disk. If you cannot locate it you can find it here. The trick is used in ColorMapCB () callback.
04-04-2014 07:19 AM