client-graphics selection

client-graphics selection

Anonymous
Not applicable
465 Views
5 Replies
Message 1 of 6

client-graphics selection

Anonymous
Not applicable
Hi: I have some client graphics which I want to be selectable. I am using C++, and Inventor Professional 2009 SDK. I set the both the client graphics object and graphics node to be selectable after they are created using:

CComPtr m_rClientGraphics;
.
.
.
hr = m_rClientGraphics-put_Selectable(kAllGraphicsSelectable);
.
.
.
CComPtr pNode;
.
.
.
hr - pNode->put_Selectable(kAllGraphicsSelectable);

Am I right in assuming that after setting the client graphics to be selectable as above, that they should hilit when the user drags the cursor over them, regardless of whether there is a current interaction-event? They never hilit (or seem to be seletable), even when I have setup an interaction-event,and set the selection filter to 'kAllCustomGraphicsFilter".
0 Likes
466 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable
Set:

ClientGraphics->Selectable = kAllGraphicsSelectable

and

GraphicsNode->Selectable = TRUE

Sanjay-
0 Likes
Message 3 of 6

Anonymous
Not applicable
Still get none of the client-graphics being selectable. There must be something else. Thanks, Tom
0 Likes
Message 4 of 6

Anonymous
Not applicable
Well, I kind of have it working. I actually have two client-graphics objects which are both set to 'kAllGraphicsSelectable' when they are created. Later, nodes are added to these client-graphics. If after adding a node and setting its 'Selectable' to TRUE, I reset its client-graphics object to 'kAllGraphicsSelectable', then all the nodes become selectable except one (either the first or the last node added in each client-graphics object). One client-graphics object is associated with the folded-model, the other with the flat-pattern (don't know if this is important).
0 Likes
Message 5 of 6

Anonymous
Not applicable
I just tried this with the "Client Graphics - Line" sample in programming
help, and it works fine. The only changes I made to that sample was to set
Selectable properties per my previous email. I was able to select it with
and without InteractionEvents active. Something to do with the color of the
client graphics you created or the background? Perhaps it is getting
highlihgted and you are not seeing it?

Sanjay-
0 Likes
Message 6 of 6

Anonymous
Not applicable
Finally got all client graphics selectable by making the node selectable AFTER adding graphics to it. I was calling
(pNode->Selectable = true;) right after the node was created - when it was empty. The call I added to make the client-graphics selectable (m_rClientGraphics->Selectable = kAllGraphicsSelectable) after adding each node, made all the nodes before it selectable, since they already had graphics (linestrips) in them. That's why the last node wasn't selectable. Thanks for your help, Tom
0 Likes