Inserting an image in a column of a multicolumn listbox

Hi,
How can I insert an image in a column and row of a multicolumn listbox? Is it possible?
Thanks,
ToNi.

To change any property of a cell, you must first select it using the Active Cell Property node, a cluster of row and column indexes. Setting the indexes values to -2 select the entire row/column/table, including the headers, setting the indexes to -1 select only the headers.
Changing a column foreground color without affecting the header color is therefore a 3 steps operation :
- set the active cell property to -1, n (n being he column index); read the foreground color
- set the active cell property to -2, n; write the new foreground color
- set the active cell property to -1; write back the previously read foreground color
Since you cannot change programmatically the images in a ring, the pict ring array cannot be used if you want to load new images at run time.
Use instead a picture array, as shown in the attached vi. I still use a pict ring, but that's just as a convenient image source. Replace it with your own source (file dialog for instance...)
CC
Chilly Charly    (aka CC)
         E-List Master - Kudos glutton - Press the yellow button on the left...        
Attachments:
ListBox & Picts.vi ‏1 KB

Similar Messages

  • How do you drag and drop columns in a multicolumn listbox?

    Hello,
    Im trying to have a multicolumn listbox setup so that you could select a column, and drag it to another location so that the use would be able to rearrnage the table if they so pleased. I've tried looking for a few different ways to do this, but I havent found anything yet. Is there a way that this can be done?
    Thanks,
    Mark

    Hey, see the attached examples.  I modified the example mentioned earlier.  You basically use a invoke node to get the position of the mouse cursor when the drag starts.  This allows you to know what column you are dragging.  Then you do the same when the "drop" event happens.  This allows you to know where you want to drop the event.  Then you have to program in the change in the listbox's strings.  That is at least how I have done it in the past.
    Let me know if this helps.
    Dan
    Daniel Eaton
    National Instruments
    Systems Engineering
    Embedded and Industrial Control
    Attachments:
    Example FP.JPG ‏61 KB
    Example BD.JPG ‏75 KB

  • Auto adjust column width in multicolumn listbox

    Hi
    May I know, does multicolumn listbox has a function / control to auto adjust the column width?  If not, how can I solve this problem, as user could not view the full data if the width that I set is too small. It would be annoying if the user need to adjust it manually each time they get the data from database....
    Any advise??? TQQQQQ......

    Hello 222,
    I've already seen a few threads about "auto adjust multi-column listbox column width", as far as I can remember, there is not such option in LV 7.1 (I don't know about LV 8).
    Meanwhile I think there are option that can allow the user the modify column width at runtime. This plus an horizontal scrollbar should be the alternative... I know it is not "perfect" for the user.
    You also have the possibility to do a function that will compare the string length to the column width, and to programatically increase the width if needed.
    Personnaly I wouldn't go for this but this is your choice
    When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"

  • How can I insert a image into a BLOB column in a table?

    I am using forms6i against a 10gR2 database and I have one table with a BLOB column and I try to insert a image into this column. I get ORA-01461 error.
    The curious case is that in another table with a BLOB column it works very fine.
    What happens with the first table? How can I avoid the error?
    Thanks in advance.

    Hi hyue,
    Thanks for visiting Apple Support Communities.
    If you would like to add an image to a project in iMovie for iOS, see this article for helpful steps:
    iMovie for iOS (iPad): Add photos to a project
    http://support.apple.com/kb/PH3171
    All the best,
    Jeremy

  • How to Insert Image in a Column of a table

    Hi
    I have read several documentations but still could not find any relevant one that can help me in inserting a image in a BLOB column of a table.I have read about DBMS_LOB but still not clear how to insert an image in the table.
    I followed following steps :
    create table Emp_Identity(Id Number,Photo BLOB);
    Insert Into Emp_Identity(1,'d:\vishal.bmp');
    Please tell me steps to be followed.
    Regards
    Vishal Chaudhry
    null

    I am using Developer 2000 Forms 6i as Front End (Oracle 8.1.6)
    My table structure is:
    SQL> desc test_lob
    Name Data Type
    ID NUMBER
    NAME VARCHAR2(100)
    PHOTO BLOB
    SOUND BINARY FILE LOB
    IS there any way to display the BFILE contents on the frontend.....?
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by vishal chaudhry ([email protected]):
    Hi,
    I could actually insert an image in a BLOB type column from the backend(Sql plus) not directly but by using BFILE and see that image on the frontend (Forms 6i Developer 2000,Item type is Image as there is nothing like BLOB/BFILE in front end) using the following procedure :
    IS there any way I can insert an image directly in a BLOB column from the backend rather than using BFILE?
    CREATE OR REPLACE PROCEDURE loadLOBFromBFILE_proc IS
    Dest_loc BLOB;
    Src_loc BFILE := BFILENAME('SOUND_DIR', '123w.bmp');
    ** SOUND_DIR is a logical directory created by giving path of the server
    ** Create Directory SOUND_DIR as 'd:\u020\o816\ctx\test'
    ** d:\u020\o816\ctx is the physical path of the server \\pslndb\ctx$
    ** test is the dummy testing directory created on the server
    ** 123w.bmp is lying in the test directory
    Amount INTEGER ;
    BEGIN
    Amount := DBMS_LOB.GETLENGTH(Src_loc);
    SELECT photo INTO Dest_loc FROM test_lob
    WHERE ID = 1
    FOR UPDATE;
    /* Opening the source BFILE is mandatory: */
    DBMS_LOB.OPEN(Src_loc, DBMS_LOB.LOB_READONLY);
    /* Opening the LOB is optional: */
    DBMS_LOB.OPEN(Dest_loc, DBMS_LOB.LOB_READWRITE);
    DBMS_LOB.LOADFROMFILE(Dest_loc, Src_loc, Amount);
    /* Closing the LOB is mandatory if you have opened it: */
    DBMS_LOB.CLOSE(Dest_loc);
    DBMS_LOB.CLOSE(Src_loc);
    COMMIT;
    END;
    <HR></BLOCKQUOTE>
    null

  • Insert Image to BLOB column

    Hi,
    How can i insert a image/largefile into table (having BLOB column) from sql plus?
    Thanks

    Hi!
    Do this with PL/SQL.
    CREATE TABLE image_tbl
      filename VARCHAR2(4000),
      image   BLOB
    DECLARE
          v_blob       BLOB;
          v_srcfile    BFILE;
    BEGIN
          DBMS_LOB.CreateTemporary(v_blob, TRUE);
          DBMS_LOB.Open(v_blob, dbms_lob.Lob_ReadWrite);
          v_srcfile := Bfilename('IMAGE_DIR', 'image.gif');
          DBMS_LOB.FileOpen (v_srcfile, dbms_lob.File_ReadOnly);
          DBMS_LOB.LoadFromFile(v_blob, v_srcfile, DBMS_LOB.GetLength(v_srcfile));
          INSERT INTO image_tbl (filename, image)
          VALUES ('image.gif', EMPTY_BLOB());
          UPDATE image_tbl
          SET image = v_blob
          WHERE filename LIKE 'image.gif';
          DBMS_LOB.FileClose(v_srcfile);
          COMMIT;
    END;I hope that one will help you.
    yours sincerely
    Florian W.

  • Insert an Image in Table's column

    Hello again Gurus!
    We're trying to insert an image in a table column like in answers analysis. Our issue is that we need to use some images based on conditional formatting, for example, an arrow that describes project trends.
    It can be done in Publisher's reports? Any workaround to that issue?
    Regards,
    Ariel

    With BI Publisher, you create a data model (that includes the source query) for generating the data and you use the xml generated to develop RTF templates and you would include the code (as suggested in my previous thread) in the RTF templates.
    Please use the Report Designer's guide to familiarize yourself with the process of creating the BI Publisher Report: http://docs.oracle.com/cd/E23943_01/bi.1111/e22254/toc.htm
    Hope that helps.
    Thanks,
    Bipuser

  • Inserting an image from an URL in a BLOB

    Hello all,
    As it's said in the title, I need a PL/SQL procedure to insert a image from web URL in a BLOB table column.
    How can I do that?
    Thanks in advance for your help.
    Max

    found this on the internet http://www.oracle-base.com/articles/misc/RetrievingHTMLandBinariesIntoTablesOverHTTP.php
    CREATE TABLE http_blob_test (
      id    NUMBER(10),
      url   VARCHAR2(255),
      data  BLOB,
      CONSTRAINT http_blob_test_pk PRIMARY KEY (id)
    CREATE SEQUENCE http_blob_test_seq;
    CREATE OR REPLACE PROCEDURE load_binary_from_url (p_url  IN  VARCHAR2) AS
      l_http_request   UTL_HTTP.req;
      l_http_response  UTL_HTTP.resp;
      l_blob           BLOB;
      l_raw            RAW(32767);
    BEGIN
      -- Initialize the BLOB.
      DBMS_LOB.createtemporary(l_blob, FALSE);
      -- Make a HTTP request and get the response.
      l_http_request  := UTL_HTTP.begin_request(p_url);
      l_http_response := UTL_HTTP.get_response(l_http_request);
      -- Copy the response into the BLOB.
      BEGIN
        LOOP
          UTL_HTTP.read_raw(l_http_response, l_raw, 32767);
          DBMS_LOB.writeappend (l_blob, UTL_RAW.length(l_raw), l_raw);
        END LOOP;
      EXCEPTION
        WHEN UTL_HTTP.end_of_body THEN
          UTL_HTTP.end_response(l_http_response);
      END;
      -- Insert the data into the table.
      INSERT INTO http_blob_test (id, url, data)
      VALUES (http_blob_test_seq.NEXTVAL, p_url, l_blob);
      -- Relase the resources associated with the temporary LOB.
      DBMS_LOB.freetemporary(l_blob);
    EXCEPTION
      WHEN OTHERS THEN
        UTL_HTTP.end_response(l_http_response);
        DBMS_LOB.freetemporary(l_blob);
        RAISE;
    END load_binary_from_url;
    EXEC load_binary_from_url('http://forums.oracle.com/forums/themes/english/resources/oralogo_small.gif');

  • How to insert a image file in oracle8i db

    hi..
    i want to add some new logo's in my oracle 8i database...i created the column and datatype for that but i don't know the proper command for
    insert the logo.
    so i need u r help..and i want to use that logo in my reports6i too.
    regards
    kannan

    Hi,
    Check this
    Insert Picture (image) using oracle forms
    HTH
    - Pavan Kumar N

  • Insertion of image in the data base - Help-me!!!!

    hello for all..., Well, somebody has some example of insertion of image in the data base saw upload, using JSP (Scriptlets)?
    or some example that I can insert in the bank the name of the image, and the image in a directory!???????
    Thank�s!

    if u r using sql server then u can define a column as TEXT and insert the file as binayr data, along with that u can store the file name.
    While retirving u can creat a fileiputstream and read the binary data and displya the image in the browser.
    Another way is to use upload servlet and store the image files in the server hard drive and store the image name and path in datbase .

  • Display conditional Image in Report Column

    Hi,
    I'm quite new to HTMLDB and searched the forum for the mentioned matter:
    I have a report with about 3 columns. In the second column(Col2) I have a values like male or female. Is it possible and if yes how to insert an image before the value in Col2 based upon evaluating the column value?
    For example my report looks like that:
    [Col1] [Col2] [Col3]
    blabla oMale blabla
    If the value for Col2 is female I want to display another image.
    Can anybody help me??
    Thanks

    In my case it has to be something like that? :
    select col1,col2,
    case
    when col3 = 'Value' then '&lt;img src="#IMAGE_PREFIX#picture.gif"&gt;' || col3
    end,
    col4
    from ...

  • Images in Blob Column..

    Hi
    I have a function that retrieves the blob column which has the image data. I cannot view this from Toad and get the value {hugeBLOB} when I query via Toad.
    I used it in a VB.Net app, but I'm unable to reterive the image there also. Can you please suggest how I can retrieve blob column (which has images) into a .jpg format? I need to retreive the images based on the query.
    Thanks for all suggestions.
    ASR

    Hi,
    Your question is not according to Forum. You must post your thread (for immediate response) on Oracle Forum for Dot Net/VB Forum.
    But i'm going to accept your request.
    I've inserted/ saved image in oracle 9i database. And As well i've read/displayed image into Picture Control from Oracle9i database.
    But i've used C# Dot Net (Visual Studio 2005 Professional) as front hand tool.
    Sorry for VB. One thing IMPORTANT:
    I'm going mention code in C# you can Covert into VB Dot Net. Through Online FREE Compiler(www.developerfusion.co.uk/ and click on utilities.)
    --------------------------------Here Below is C# Code ----------------------------------------------------
    Con.Open();
    string myquery = "Select Form_id,Emp_image From Employee where Form_id=2840";
    OracleCommand cmd = new OracleCommand(myquery, con);
    OracleDataReader dr = cmd.ExecuteReader();
    Boolean recordExist = dr.Read();
    if (recordExist)
    //Now displaying Picture.
    MessageBox.Show("Pic is being loaded by C#. Now");
    OracleLob blob = dr.GetOracleLob(1); //Column #, Emp_image
    Byte[] BLOBData = new Byte[blob.Length];
    //Read blob data into byte array
    int i = blob.Read(BLOBData, 0, System.Convert.ToInt32(blob.Length));
    //Get the primitive byte data into in-memory data stream
    MemoryStream stmBLOBData = new MemoryStream(BLOBData);
    //LOADING INTO PICBOX1
    Picbox1.Image = Image.FromStream(stmBLOBData);
    MessageBox.Show("Now i'm reseting it.");
    Picbox1.SizeMode = PictureBoxSizeMode.StretchImage;
    Else
    MessageBox.Show("Reocrd not found against this id.");
    Hopefully it helps you. If it is still difficult to understand don't shy to make query.
    ---

  • Exception When I try to insert a image to MYSQL.

    Hi Folks,
    I need some help. I am trying to insert a image in MYSQL.
    I am using Struts, Msql 5.0, Tomcat 5.5, Struts 1.1. The column in MySQL where I am trying to store image is of type "Blob".
    Here is the exception I am getting.
    java.sql.SQLException: Syntax error or access violation message from server: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''test',_binary'����\0JFIF\0\0`\0`\0\0��\0C\0          
    ' at line 1"
    Code in my Action class looks like..(ps. For testing purpose I have DB code in my action class only. And its a testing code only.)
    UploadImageForm imageForm = (UploadImageForm)form;               
                   FormFile file = imageForm.getTheFile();
                   PreparedStatement psmt = null ;
                   Connection conn = null;
              conn = DBConnection.getConnection();
              String str = "INSERT INTO mainImage (name, imageData) VALUES ?,?)";
         psmt = conn.prepareStatement(str);
         psmt.setString(1, "test");
         System.out.println("in image db 4-1");
         psmt.setBinaryStream( 2, file.getInputStream(), file.getFileSize());
         System.out.println("in image db 4");
         System.out.println(psmt.toString());
         //     set the Blob
         psmt.executeUpdate();
         System.out.println("in image db 5");
         psmt.close();
         psmt = null;
    I have tried lot of different things but now I am clue less so I seek some help from you fellow developers. Any help would be greatly appriciated

    Thnx Guys after waisting few hours I realized there was a typo in my sql. But If any of you folk are looking for some code for image handing this works.

  • Inserting Multiple Images into oracle database using JDBC

    I wanted to insert multiple images into database using JDBC by reading it from the file... and i am passing photos.txt(my text file) as an input parameter... I have inserted all the values into the database except for the image part... this is my content of photos.txt file and i have copied all the images into the folder
    *" C:\\photos "*
    *1,in1.jpg,108,19,in-n-out*
    *2,in2.jpg,187,21,in-n-out*
    *3,in3.jpg,308,41,in-n-out*
    *4,in4.jpg,477,52,in-n-out*
    *5,in5.jpg,530,50,in-n-out*
    and i want to store in1.jpg,in2.jpg,in3.jpg,in4.jpg,in5.jpg into the oracle databse using JDBC.... i have tried a lot using BLOB column.... and i have created my table as
    CREATE TABLE PHOTO(
    ID NUMBER NOT NULL PRIMARY KEY ,
    Name BLOB,
    X DOUBLE PRECISION,
    Y DOUBLE PRECISION,
    Tags VARCHAR2(40)
      try {                 // for restaurant System.out.println();System.out.println();System.out.println(); System.out.print("  Creating Statement for Photo...\n");             stmt2 = con.createStatement ();                       stmt2.executeUpdate("delete from PHOTO"); stmt2.executeUpdate("commit"); PreparedStatement stmt3 = con.prepareStatement ("INSERT INTO PHOTO VALUES (?, ?, ?, ?, ?)");             System.out.print("  Create FileReader Object for file: " + inputFileName1 + "...\n");             FileReader inputFileReader2 = new FileReader(inputFileName1);             System.out.print("  Create BufferedReader Object for FileReader Object...\n");             BufferedReader inputStream2  = new BufferedReader(inputFileReader2);             String inLine2 = null;                         String[] tokens; //            String[] imageFilenames = {"c:\\photos\\in1.jpg","c:\\photos\\in2.jpg","c:\\photos\\in3.jpg","c:\\photos\\in4.jpg","c:\\photos\\in5.jpg", //  "c:\\photos\\in6.jpg","c:\\photos\\in7.jpg","c:\\photos\\in8.jpg","c:\\photos\\in9.jpg","c:\\photos\\in10.jpg","c:\\photos\\arb1.jpg","c:\\photos\\arb2.jpg", //  "c:\\photos\\arb3.jpg","c:\\photos\\arb4.jpg","c:\\photos\\arb5.jpg","c:\\photos\\den1.jpg","c:\\photos\\den2.jpg","c:\\photos\\den3.jpg", //  "c:\\photos\\den4.jpg","c:\\photos\\den5.jpg","c:\\photos\\hop1.jpg","c:\\photos\\hop2.jpg","c:\\photos\\hop3.jpg","c:\\photos\\hop4.jpg","c:\\photos\\hop5.jpg"};               File file = new File("C:\\photos\\in1.jpg");            \\ ( Just for example  )           FileInputStream fs = new FileInputStream(file);                         while ((inLine2 = inputStream2.readLine()) != null) {               tokens= inLine2.split(",");             st2 = new StringTokenizer(inLine2, DELIM);                                                             stmt3.setString(1, tokens[0]);               stmt3.setBinaryStream(2, fs, (int)(file.length()));               stmt3.setString(3, tokens[2]);               stmt3.setString(4, tokens[3]);               stmt3.setString(5, tokens[4]);               stmt3.execute(); //execute the prepared statement               stmt3.clearParameters(); 
    As i am able to enter one image file by above code in1.jpg in to the oracle database.... but i am not able to insert all the image file in to the database.....do tell me what should i do.... and can you give me the example on the basis of the above code of mine...
    do reply as soon as possible..

    jwenting wrote:
    that depends. Putting the images in BLOBs prevents the file locations stored in the database from getting out of synch with the filesystem when sysadmins decide to reorganise directory structures or "archive" "old" files that noone uses anyway.True, but it really comes down to a business decision (cost-benefit analysis). If you have the bucks, the expertise, and the time, go with the Blobs, otherwise go with the flat files.

  • Insert an image in JTable

    hi all
    how can i insert an image in JTable instead of text in a row?
    angela

    Hi
    I am sending u two bits of codes
    execute these and let me know
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import javax.swing.border.*;
    public class FrozenTable extends JScrollPane {
    public FrozenTable()
    TableModel tableModel = new AbstractTableModel()
    public String getColumnName(int col) { return "Column " + col; }
    public int getColumnCount() { return 20; }
    public int getRowCount() { return 40;}
    public Object getValueAt(int row,int col) { return new Integer(row * col); }
    JTable table1 = new JTable(tableModel);
    JTable table2 = new JTable(tableModel);
    TableColumnModel columnModel = table1.getColumnModel();
    TableColumnModel columnModel2 = new DefaultTableColumnModel();
    TableColumn col1 = columnModel.getColumn(0);
    TableColumn col2 = columnModel.getColumn(1);
    columnModel.removeColumn(col1);
    columnModel.removeColumn(col2);
    columnModel2.addColumn(col1);
    columnModel2.addColumn(col2);
    for(int i = 0; i < 2; i++)
    TableColumn col = columnModel2.getColumn(i);
    col.setWidth(80);
    col.setMinWidth(80);
    table2.setColumnModel(columnModel2);
    table2.setPreferredScrollableViewportSize(table2.getPreferredSize());
    table1.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    table1.getTableHeader().setUpdateTableInRealTime(false);
    table2.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    table2.getTableHeader().setUpdateTableInRealTime(false);
    table2.getColumnModel().getColumn(0).setCellRenderer( new ColorRenderer(0) );
    table2.setBorder(new CompoundBorder(new MatteBorder(0,0,0,1,Color.black), table2.getBorder()));
    setViewportView(table1);
    setRowHeaderView(table2);
    setCorner(JScrollPane.UPPER_LEFT_CORNER, table2.getTableHeader());
    public static void main(String[] args)
    JFrame frame = new JFrame();
    JPanel panel = new JPanel();
    FrozenTable table = new FrozenTable();
    panel.setLayout(new GridLayout(1,1));
    panel.add(table);
    frame.getContentPane().add(panel);
    frame.setSize(500,250);
    frame.setVisible(true);
    class yourClass extends JLabel implements TableCellRenderer
         int selectedRow = 0;
         public yourClass ()
              super();
              setOpaque(true);
         public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
              try
                   setIcon(new ImageIcon("image.gif") );          
              }catch(Exception e) {  }
              return this;
    Cheers :)
    Nagaraj

Maybe you are looking for

  • Can't open Pages 09 document

    Like many others on this post, I also cannot open a very important Pages 09 document built using mainly blank pages and a couple of standard Page Layout Templates. It is 80 pages of colour photos with captions, totalling 1.7 GB. I saved everything su

  • How to get txt output in a column?

    Don't know and can't find anywhere, how to get output in a column in a dynamic textfield instead of getting the output i.e. output1, output2, output3, etc I would like to have it as output1 output2 output3 but I don't know how to make returns in flas

  • How do I get my Pages documents to my iMac via iCloud?

    So I successfully updated my iPhone 4, iPad2 and my iMac. My iPad and iPhone sync flawlessly via the cloud. I need to know how to get those same Pages documents to sync with the iMac via the cloud. Anyone? Thanks

  • A505 doesnt start from sleep mode

    My laptop sometimes doesnt start from sleep mode. Everything is flashing but display is black. after reset with power button starting ok. Do you have some idea? Thanks A505-S6033, Windows 7

  • How do you make programs open and close into their own tab in the dock, like they do in windows?

    You know in Windows, how there is a tab for each program in the taskbar?  And, if the program is minimized, when you click the tab, the programs restores.  And when you click the tab again, the program minimizes. Can this be done on Mac? Thanks! Bret