LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Move graph palette programmatically

Solved!
Go to solution

@mcduff wrote:



I use the same method myself, and given a kudo to your idea in the past. (When I clicked a kudo disappeared then when a re-clicked it came back.) 


Hah, so you have! Re-kudoing it doesn't up the number any but it does give that little dopamine hit of "ooh, a kudo!" since it re-sends the notification 🙂

0 Kudos
Message 11 of 16
(778 Views)

@paul_cardinale wrote:

wiebe@CARYA wrote:

@TenJigoku77 wrote:

There is only 1 solution for me but it takes time --> Replacing the palette with a new control wich does the exact same things that the palette and then resize it.


Sadly, that is the only solution I've found.

 

There are ways to get a reference to the graph palette, but I wouldn't use them in production code.

 


Really?  What are those ways?


Pretty sure you've posted one: Guess the UID's; Convert to reference...

0 Kudos
Message 12 of 16
(768 Views)

@daveTW  a écrit :

Another note: Set the min-size of the pane to a value where the graph palette always does as expected


Hey everyone,

Thanks for all your propositions.
Somehow I feel relieve that I'm not the only one getting issues with that.

daveTW, it's a simple solution but I think I will go with that, after testing it of course. I didn't think about accessing pane properties to fix the min size ^^

Thanks BertMcMahan for the info, I'll try this aswell, even if it's quite odd to handle 2 panes that should have been on the same one. And in my case each pane have a specific thread so it means having to handle another thread 😫

I'll keep you posted with that.
By the way, is it possible to accept 2 message as a solution ?
Bye !

0 Kudos
Message 13 of 16
(750 Views)

wiebe@CARYA wrote:

@paul_cardinale wrote:

wiebe@CARYA wrote:

@TenJigoku77 wrote:

There is only 1 solution for me but it takes time --> Replacing the palette with a new control wich does the exact same things that the palette and then resize it.


Sadly, that is the only solution I've found.

 

There are ways to get a reference to the graph palette, but I wouldn't use them in production code.

 


Really?  What are those ways?


Pretty sure you've posted one: Guess the UID's; Convert to reference...


It took me a while to find it (https://forums.ni.com/t5/LabVIEW/How-to-get-a-variant-s-value-as-a-string/m-p/4197740#M1215137).  But it doesn't find the Graph Palette (despite the fact that the Graph Palette is a decoration owned by the Graph.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 14 of 16
(739 Views)

@paul_cardinale wrote:

wiebe@CARYA wrote:

@paul_cardinale wrote:

wiebe@CARYA wrote:

@TenJigoku77 wrote:

There is only 1 solution for me but it takes time --> Replacing the palette with a new control wich does the exact same things that the palette and then resize it.


Sadly, that is the only solution I've found.

 

There are ways to get a reference to the graph palette, but I wouldn't use them in production code.

 


Really?  What are those ways?


Pretty sure you've posted one: Guess the UID's; Convert to reference...


It took me a while to find it (https://forums.ni.com/t5/LabVIEW/How-to-get-a-variant-s-value-as-a-string/m-p/4197740#M1215137).  But it doesn't find the Graph Palette (despite the fact that the Graph Palette is a decoration owned by the Graph.


Not sure why that loop wouldn't catch that UID.

 

UID To Reference does seem to crash LV quite a lot when tried with random (invalid) UIDs.

 

However, I used this to get the graph palette's UID:

wiebeCARYA_0-1662971749551.png

Simply make sure there's no selection, then run this VI and select the palette (while subject isn't running).

 

After that, I can move the palette with that UID (..\LabVIEW 2020\vi.lib\VIServer\UID to GObject Reference.vi).

wiebeCARYA_1-1662971841880.png

 

For the rest of the group, the UID won't change unless the graph is deleted.

0 Kudos
Message 15 of 16
(688 Views)

wiebe@CARYA wrote:

@paul_cardinale wrote:

wiebe@CARYA wrote:

@paul_cardinale wrote:

wiebe@CARYA wrote:

@TenJigoku77 wrote:

There is only 1 solution for me but it takes time --> Replacing the palette with a new control wich does the exact same things that the palette and then resize it.


Sadly, that is the only solution I've found.

 

There are ways to get a reference to the graph palette, but I wouldn't use them in production code.

 


Really?  What are those ways?


Pretty sure you've posted one: Guess the UID's; Convert to reference...


It took me a while to find it (https://forums.ni.com/t5/LabVIEW/How-to-get-a-variant-s-value-as-a-string/m-p/4197740#M1215137).  But it doesn't find the Graph Palette (despite the fact that the Graph Palette is a decoration owned by the Graph.


Not sure why that loop wouldn't catch that UID.

 

UID To Reference does seem to crash LV quite a lot when tried with random (invalid) UIDs.

 

However, I used this to get the graph palette's UID:

wiebeCARYA_0-1662971749551.png

Simply make sure there's no selection, then run this VI and select the palette (while subject isn't running).

 

After that, I can move the palette with that UID (..\LabVIEW 2020\vi.lib\VIServer\UID to GObject Reference.vi).

wiebeCARYA_1-1662971841880.png

 

For the rest of the group, the UID won't change unless the graph is deleted.


I figured out what's happening:  The loop stops when it gets to a UID of an object that isn't owned by the graph.  Apparently the Graph Palette isn't created until it is made visible.  As a result of that, the objects owned by the graph don't have contiguous UIDs.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 16 of 16
(679 Views)