jack3
August 9, 2022, 2:24am
1
I am trying to redraw a size change, but it will not redraw unless I move the mouse.
Is there any way to make it redraw at the moment I press it if I have assigned a key?
best
void KeybordEvent(int key)
{
if (key == VK_A)
{
A_key_pressed = true;
}
}
menno
(Menno Deij - van Rijswijk)
August 9, 2022, 7:40am
2
You need a reference to the document, then issue the following inside the KeyboardEvent handler:
RhinoDoc doc; // obtained elsewhere
doc.Views.Redraw();
jack3
August 9, 2022, 7:43am
3
Sorry, Some were missing.
menno
(Menno Deij - van Rijswijk)
August 9, 2022, 7:55am
4
What I mean is
void KeybordEvent(int key)
{
if (key == VK_A)
{
A_key_pressed = true;
}
doc.Views.Redraw();
}
jack3
August 9, 2022, 8:03am
5
I tried the same thing and it didn’t work, but when I defined it in RunCommand it worked fine.
Thank you so much.
jack3
August 9, 2022, 8:05am
6
What is the difference between this method and the other?
public delegate void KeyboardHookEvent(
int key
)