From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

splitter label text

Solved!
Go to solution

I decided to play with verticle splitter bars today and I have a question about the labels for them.  Is there a way to have the label text on the splitter bar but not be able to select it durning runtime?

 

I attached a VI that showa what I am talking about.  Above and below the text you get a normal finger pointer and when you go over the text it turns to the text selection tool. In my program the splitter bar is on the left side of the screen and when it is clicked it slides right and shows a group of controls.  And when clicked again it closes back to the left.  But if I click on the label text the bar still slides right, but it also selects the text.  So basically I want to be able to click anywhere on the bar and not have the text selected.

 

Any ideas?

0 Kudos
Message 1 of 5
(2,356 Views)

That is stupid.  I actually have never used a label on a splitter so I'm glad you attached an example VI.

 

I do however have a work around that is equally stupid.  Use an event structure and set the mouse cursor if it enters the splitter.  It appears to work.

0 Kudos
Message 2 of 5
(2,347 Views)

That does keep the pointer from changing, but if you click inside the text the text still gets selected.  You can see a big box appear around the text.  One side note, I am using a modern splitter that is colored so the white text box is very visible when selected.

0 Kudos
Message 3 of 5
(2,342 Views)
Solution
Accepted by topic author _Bryan

@_Bryan wrote:

That does keep the pointer from changing, but if you click inside the text the text still gets selected.


If this is the case you can have another event that is Mouse Down? on the splitter and wire a constant TRUE to the discard.

0 Kudos
Message 4 of 5
(2,338 Views)

That worked great since I slide the splitter on a mouse up event.  So I used a combination of the cursor and discard to get the desired results.

 

I was also able to get an Invoke Node (Label.ObjHighlight) to work.  It would basically highlight the text then unselect it.

 

 

Thanks

0 Kudos
Message 5 of 5
(2,327 Views)