LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

iamge or icon file

I have an excel file from which, i am reading the data and displaying that in a table. Now In the Ist column of table i want to insert some icon or image. Is it possible to do that? If yes, plz suggest what to do and how?
 
Ranjeeta
0 Kudos
Message 1 of 9
(3,736 Views)
Think x-control.  you will need to overlay an array of either picture controls or intesity charts.  In the excel file, your best bet is a path to the graphic although you are not tied to that.  A table by definition is a 2-d array of strings and thus will not support graphics, so it is a matter of 'tricking' the user.  If you use a multi-column list box, you can use custom symbols if the graphics are small.  refer to labview help for more info about that.

Paul
0 Kudos
Message 2 of 9
(3,729 Views)
Even i think i have to use activeX -controls. I have checked all the properties. I didn't get anything in that which will solve my problem. So, will you plz suggest me what properties to try?
0 Kudos
Message 3 of 9
(3,719 Views)
An XControl might be a bit heavy here. It also has a nasty characteristic,
that all normal table properties are gone! Usually, you'll need quite a few
table properties, and you'll need to create them all. Or make one method
that returns the XControls table reference, but that can be tricky (the
returned reference is often invalid, even if it is "fresh").

For the picture part, use a picture control if you want to load different
pictures at run time. If you only want to overlay one picture, use a
decoration. If you want the table to be scrollable, you have a lot of work
to do. You need to program to trim the image when the first cell is
partially hidden. The moment to do this can't be determined properly. Since
there is no "table scrolled" event, you need to do this at each mouse move
event (although you only have to do it when the mouse is down). If the full
table is always shown (not scrollable) it is a lot easier.

I had to do something like this a few times. I chose to use a picture
control for the entire table. If you only need to display the table (the
user can't edit it), it is a lot easier to draw a picture and a table in a
picture control, than to display a picture on top of a table. If it has to
be editable, you can to make your own hit detection, and position a control
on a mouse down event. Give the control key focus, and you can "edit the
cell". On the controls value change, redraw the picture. You can put this in
an XControl as well. Both are not beginners stuff though, but not very
advanced either.

Regards,

Wiebe.





0 Kudos
Message 4 of 9
(3,717 Views)
Not an ActiveX control, an XControl. That is a container native to LabVIEW,
much like a subpanel. With an XControl, you can make "your own control". All
the code you normally put in your main vi, you can hide in the XControl's
diagram. You do need the full development version of LabVIEW (8>).

Regards,

Wiebe.


0 Kudos
Message 5 of 9
(3,710 Views)
You can possibly embed the excel sheet and display it directly in the VI.  I have not personally done this, but I am sure it can be done.

Paul
0 Kudos
Message 6 of 9
(3,708 Views)
Displaying the Excel sheet directly can be done fairly easily using an ActiveX container. However, the pictures won't be inside of cells, but rather on top of cells in their own "layer". If this is OK, then I would agree this is a fairly straightforward and rasonable course.

Another option is to use two separate controls. Your table and an array of pictures that's next to it to be the "first" column. You can use events to scroll the picture array at the same time that you scroll the table.
0 Kudos
Message 7 of 9
(3,700 Views)
I want to insert some symbols in the listbox. I have tries with various pic, but couldn't be able to inert that in the list. I can only use the symbol which are already present. I got these sysmbols from the examples. Now i want to insert some more symbols in that. Can we do that? If yes what the way to do? what is the picture format or symbol format. I am using Labview 7.1
0 Kudos
Message 8 of 9
(3,678 Views)
You can display standard symbols, first right click the control, and select
Visible Items>Symbols. The listbox doesn't have the possibility to display
custom symbols in 7.1. You could misuse a tree control for it, in some
cases. It does behave differently though.

The tree control has an invoke node Custom Item Symbols>Set To Custom
Symbol. You can wire a pixmap to it. Pixmaps can be created in several ways.
Easiest is probably to use the Load PNG, MGP or JPG vi's, in the Graphics &
Sound > Graphics Formats. In 8.2 the listbox can do this too.

Regards,

Wiebe.


0 Kudos
Message 9 of 9
(3,668 Views)