h1voltage Posted June 13, 2007 Report Share Posted June 13, 2007 Hello everyone, I am curious if it is possible to make controls semi-transparent instead of completely transparent. I would like to be able to control this programmatically, but I have not been able to find a way to do this through property nodes yet. Have I overlooked something, or is there a way to do alpha-blending on controls? Thanks! ~Zack Quote Link to comment
crelf Posted June 13, 2007 Report Share Posted June 13, 2007 QUOTE(h1voltage @ Jun 13 2007, 12:52 AM) I am curious if it is possible to make controls semi-transparent... Hi Zack - unfortunately, there is no native way of setting an individual control's transparency, and I'm pretty sure there's no non-native method either. Quote Link to comment
Grampa_of_Oliva_n_Eden Posted June 13, 2007 Report Share Posted June 13, 2007 QUOTE(crelf @ Jun 12 2007, 11:10 AM) Hi Zack - unfortunately, there is no native way of setting an individual control's transparency, and I'm pretty sure there's no non-native method either. Agreed. Convoluted idea follows; 1) Move control off screen 2) insert pic control were control was (transparent background and frame) 3) Do a invoke node get image of control. 4) blend image of control with background of pic and display in pic (this is were you determine your transparency) 5) Event mouse down on pic >>> Move off-screen control to original loc, hide picture. Another Can we set the transparncy of a FP running in a sub-panel? Ben Quote Link to comment
h1voltage Posted June 13, 2007 Author Report Share Posted June 13, 2007 Wow, that is definitely a round-about way of doing it, but it might work. I see where you are going with the sub-panels, but unfortunately I have had no luck there either. Even if you use property nodes in the VI that is called by the subpanel, it doesn't use alpha-blending. Maybe this is possible with XControls? Quote Link to comment
crelf Posted June 13, 2007 Report Share Posted June 13, 2007 QUOTE(Ben @ Jun 13 2007, 01:32 AM) Convoluted idea follows... That's just crazy enough to work! Quote Link to comment
PJM_labview Posted June 13, 2007 Report Share Posted June 13, 2007 QUOTE(Ben @ Jun 12 2007, 08:32 AM) Agreed.Convoluted idea follows; 1) Move control off screen 2) insert pic control were control was (transparent background and frame) 3) Do a invoke node get image of control. 4) blend image of control with background of pic and display in pic (this is were you determine your transparency) 5) Event mouse down on pic >>> Move off-screen control to original loc, hide picture. Another Can we set the transparncy of a FP running in a sub-panel? Ben Doing alpha blending in a picture control work very well. This could require quite a bit of work if you want to write reusable VIs and keep it efficient. As a side not, the "Read PNG File.vi" return data with the aplha blending information (ignore the threshold parameter as I believe it is only use to calculate the mask) in the form of ARGB (if I remember right). This mean that you can create very decent effect&UI components that does support alpha blending by combining 24-bit PNG images with existing LabVIEW controls (all in a picture control). PJM Quote Link to comment
Grampa_of_Oliva_n_Eden Posted June 13, 2007 Report Share Posted June 13, 2007 QUOTE(PJM_labview @ Jun 12 2007, 12:49 PM) Doing alpha blending in a picture control work very well. This could require quite a bit of work if you want to write reusable VIs and keep it efficient.As a side not, the "Read PNG File.vi" return data with the aplha blending information (ignore the threshold parameter as I believe it is only use to calculate the mask) in the form of ARGB (if I remember right). This mean that you can create very decent effect&UI components that does support alpha blending by combining 24-bit PNG images with existing LabVIEW controls (all in a picture control). PJM Thanks PJM! Can you guess what I will be playing with this week-end? Ben Quote Link to comment
Yair Posted June 13, 2007 Report Share Posted June 13, 2007 Also, have a look at this. You can import a transparent image into a control. Quote Link to comment
Sherif Posted June 15, 2007 Report Share Posted June 15, 2007 QUOTE(yen @ Jun 12 2007, 09:47 PM) Also, have a look at http://forums.ni.com/ni/board/message?board.id=170&message.id=231915' target="_blank">this. You can import a transparent image into a control. what a nice Link ... Yen thank you very much Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.