LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get rid of the black border around the Picture Command Button?

There's a one-pixel-wide black line around the Picture Command Button that needs to go.
 
How can I get rid of it or make it invisible?
0 Kudos
Message 1 of 9
(5,140 Views)
I don't know how to solve your problem but look how different our feeling about the aspect of the UIR is! All LabView-style controls actually HAVE the surrounding outline except two types of toggle buttons (text and push button): this gives me the impression of a discontinuity in the panel, that is informs me that that particular element is operable (the same as there would be a small but visible gap around a hardware button on some instrument's panel). I usually add an outline to those toggle buttons when I use them to uniform their aspect to that of other controls (buttons, toggle buttons, rings...).
 
Said this, depending on your application you could move to a simple picture control but you have some (great) disadvantages with respect to a button:
1. The picture control is and remains an indicator: it cannot be operated (you'll loose the look-and-feel od pressing the button)
2. It can manage only click events
3. This control cannot be made the active (i.e. the focus will remain on another control event if you click on it)
 
Hope this helps
Roberto


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 9
(5,125 Views)
LabVIEW allows you to have picture buttons with no border. LabWindows/CVI does not, unless somebody tells me otherwise. Please, somebody tell me otherwise.

Also, the LabWindows/CVI picture control you mention is what I had to resort to. It was really hard to program though, because it did not have the EVENT_COMMIT event, only the EVENT_LEFT_CLICK, so I had to jump through hoops to make it work.
0 Kudos
Message 3 of 9
(5,120 Views)
Ok, let's try with the little trick you see in the panel attached: to discover it just paint the panel in some color other than the default color.


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 4 of 9
(5,107 Views)

Hey bmihura,

  I've never really been bothered by it, but to feed off Roberto's idea I can offer the following:

Add a Classic-style control > Decoration > Flat frame.

  Chance the color of the flat frame to match the background of your panel.  Size the flat frame decoration so that its inside pixels overlaps the picture control's black border.  And boom, problem solved.  Now, the downside is that focus should not be shown if the Z-order of the frame is on top of the picture control.  This may not be an issue for you.  Also, the flat frame has a specific width that doesn't appear to be adjustable.  So if you are trying to smoosh several picture buttons right next to each other, my flat-frame workaround will require some extra space between the buttons.  If you dynamically change the panel color, just make sure to adjust the color of the flat frame to match it.  Just an idea... (but credit to Roberto Smiley Wink).

Orlan

Message Edited by cosmo on 01-24-2006 01:03 PM

0 Kudos
Message 5 of 9
(5,082 Views)

I might also add that I agree with bmihura; ideally the black border should be removed so that this control will match the appearance of all other controls.  There are probably thousands upon thousands of panels out there that employ the picture button.  I understand that blindly removing the black border could cause potentially appearance issues for many, many people--making them go back and move a control a few pixels this way, or that way.  So there are considerations for NI that may make this ideal repair unreasonable.  Perhaps it would be a good idea to see what the implications would be?  It should be put on the list at NI to check that future CVI controls all follow a standard style instead of having a few one-offs.

Orlan

 
0 Kudos
Message 6 of 9
(5,078 Views)
Hello all,
 
So I have brought this to the attention of the development team and went ahead and created a Product Suggestion on making the border around controls consistent.  Thanks for the feedback!
Wendy L
LabWindows/CVI Developer Newsletter
0 Kudos
Message 7 of 9
(5,054 Views)
1. The simplest solution to bmihura problem can be to use a classic-style picture command button: once loaded the image its aspec is quite similar to that of lab-style one (provided that the image has a solid background and the control is not larger than the image: in this case last the 3d effect of lab-style controls is relevant)
 
2. In search for a consistency on control aspect, I respectfully disagree with cosmo and bmihura opinion towards the outline. The following controls HAVE the outline:
      Command buttons - Picture command buttons - Square toggle buttons - Menu rings - Popup menu rings
The following control do not have it:
      Push buttons (either square or text) - Recessed menu rings
 
I do like this outline, as I already told it gives me the impression that the control is operable. As an example, a square push button has exactly the same aspect as a simple decoration: this can disturb the operator since he cannot catch at a glance which element of a panel actually is a control. He has to look at the label, that is in this case the user interface is hard to "read" and ultimately will give our programs a poor qualification.
 
I attach a simple UIR to support my opinions.


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 8 of 9
(5,050 Views)

Well,

  I will concede that I'm personally more interested in consistency than whether the border must absolutely be there or not.  I seldom use the full mix of the available CVI controls on any single GUI, so sometimes it ends up with lots of black border, except for one or two controls, and sometimes I end up with almost no black borders, again except for one or two controls.  Because it wasn't consistent when they were designed, they obviously can't be consistent in implementation.  Perhaps my last post emphasized the presence or absence of borders more than consistency.  That was bad logic, so thanx Roberto.  And Thanx Wendy  Smiley Happy

Orlan

0 Kudos
Message 9 of 9
(5,034 Views)