Viravan :code of the combobox editor

Hi ,
I cam across a message on this dicussion board where you said that u can email the code of the combobox editor shown on http://www.aokabc.com/index.htm.
could you pls do so.
I am basically trying to get the selected value in a combobox embedded a table.
thx
Connie

I am basically trying to get the selected value in a combobox embedded a table.Perhaps your problem is simply because the selected value from the combo box is not correctly stored in your table model. Please take a look at the combo box example in the tutorial provided by Sun at the link shown below:
http://java.sun.com/docs/books/tutorial/uiswing/components/table.html
;o)
V.V.

Similar Messages

  • How to call a function with the dependency editor

    Dear all,
    I am trying to develop a dependency for the charectristics with dependency editor (t-code:CU01).
    But it always occurs an error "E28152 Function myfunction is not declared".
    The following is the snatch of my code. Please provide me the solution, documents or reference link
    about how to write code with the dependency editor.
    000010 pfunction myfunction(
    000020   ......
    000030 )
    Thanks & Regards,
    Red

    I did not get any errors doing this..refer to:
    http://help.sap.com/saphelp_erp60_sp/helpdata/EN/92/58c3fc417011d189ec0000e81ddfac/frameset.htm
    http://help.sap.com/saphelp_erp60_sp/helpdata/EN/92/58c3fc417011d189ec0000e81ddfac/frameset.htm
    Check if you have the relevant access / authorizations.
    Regards,
    Srini

  • Modify code generated by Form Editor

    Hello,
    I'm wondering how I can add the methode
    setLocationRelativeTo()
    to the code generated by the Form Editor in JDeveloper12.
    Or what do I have to do, to create a Project with Swing GUI, using a visual editor, which let's me modify the code???
    Maybe this is a very odd question, but I'm just a little bit confused. I'm quite sure, that I was able to modify my code using the Visual Editor in JDeveloper10. Or am I on the wrong way and have to write the code by totaly by myself, if I want to have the possibility of modification?
    Thanks
    chrissy

    Hi Timo,
    that's the way I think it should work, but all code for components created with visual GUI Editor is blocked. What also makes sense, because the Form Editor will overwrite it, everytime I change something with the GUI Editor.
    My start up was to create a new Application (Java Desktop Application) with a project. I think it is just using NetBeans (with which I have never worked before). Creating now a JFrame Form is using the Form Editor for visual stuff. What's nice to have, because a lot of code is auto-generated, but I also need to do some modifications, like setting the window appear in the middle of the screen with setLocationRelativeTo(). Is there a chance to do it, or do I have to start up another way, i.e. just creating a Custom Application and writing all the code by myself and use no visual editor?
    Thanks
    chrissy

  • How to add an item  in the combobox list at runtime

    i want to add an item to the list of items in the combobox. How can I do this? I tried to use the methods getselecteditem() and getitem() from the actionlistener but no success.
    so after i add an item, the next time when i run that frame, that item should be displayed in the list of items in the combobox. Can anybody help me with this?

    Thanks Encephalophathic.
    Let me explain you the whole design -
    I have a frame having textfields and comboboxes. Now in the combobox, i have added some fields during design time and some i want the user to add at runtime. After the user clicks the Save button, i want the new string if entered in the combobox by the user at runtime to be added in the list of items of the combobox. So the next time when that frame is run, the item added by the user at runtime previously should be there in the list of items displayed in the combobox.
    What I am trying to do in this code at the combobox is if the user enters a new string in the combobox, then if he presses enter key, the value entered in the list of the combobox should be entered in the list of items of the combobox. Actually i m just trying to get the item typed in by the user, so just testing with enter key, but really i want it on the button click. I tried to add the code for adding an item to the combobox in the actionperformed, but i m not able to add it so confused what to do. Please help me with this.
    Here's the whole code for that -
    import java.awt.BorderLayout;
    import java.awt.FlowLayout;
    import java.awt.GridLayout;
    import java.awt.event.ActionEvent;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.BorderFactory;
    import javax.swing.JButton;
    import javax.swing.JLabel;
    import javax.swing.JTextField;
    import javax.swing.JMenu;
    import javax.swing.JMenuBar;
    import javax.swing.JMenuItem;
    import javax.swing.JCheckBoxMenuItem;
    import javax.swing.JComboBox;
    import java.awt.event.ActionListener;
    import javax.swing.JOptionPane;
    import javax.swing.JDialog.*;
    import javax.swing.JComboBox;
    public  class EnterFD implements ActionListener{
      private JFrame frame;
       private JPanel mainpanel,menupanel,userinputpanel,buttonpanel;
       private JMenuBar menubar;
       private JMenu menu,submenu;
       private JMenuItem menuitem;
       private JCheckBoxMenuItem cbmenuitem;
       private JLabel fdnumber;
       private JLabel bankname;
       private JLabel beneficiaryname;
       private JLabel entereddate;
       private JLabel maturitydate;
       private JLabel rateofinterest;
       private JLabel amount;
       private JLabel maturityamount;
       private JTextField fdnumbertxtfield;
       private JComboBox banknamecombobox;
       private JTextField beneficiarynametxtfield;
       private JComboBox entereddatecombobox;
       private JComboBox maturitydatecombobox;
       private JTextField rateofinteresttxtfield;
       private JTextField amounttxtfield;
       private JTextField maturityamounttxtfield;
       private JButton savebutton;
       private JButton clearbutton;
    public EnterFD() {
            initComponents();}
        private final void initComponents(){
            fdnumber = new JLabel("FD Number:");
            bankname = new JLabel("Bank Name:");
            beneficiaryname = new JLabel("Beneficiary Name:");
            entereddate = new JLabel("Entered Date:");
            maturitydate = new JLabel("Maturity Date:");
            rateofinterest = new JLabel("Rate Of Interest:");
            amount = new JLabel("Amount:");
            maturityamount = new JLabel("Maturity Amount:");
            fdnumbertxtfield = new JTextField();
            banknamecombobox = new JComboBox();
            banknamecombobox.addItem("State Bank Of India");
            banknamecombobox.addItem("Bank Of Baroda");
            banknamecombobox.addItem("IDBI Bank");
            banknamecombobox.addItem("ICICI Bank");
            banknamecombobox.addItem("Punjab National Bank");
            banknamecombobox.setEditable(true);
            banknamecombobox.setSelectedIndex(-1);
            banknamecombobox.addKeyListener(new java.awt.event.KeyAdapter() {
                @Override
                public void keyTyped(java.awt.event.KeyEvent evt) {
                    banknamecomboboxKeyTyped(evt);
            banknamecombobox.addKeyListener(new java.awt.event.KeyAdapter() {
                @Override
                public void keyReleased(java.awt.event.KeyEvent evt) {
                    banknamecomboboxKeyReleased(evt);
            beneficiarynametxtfield = new JTextField();
            entereddatecombobox = new JComboBox();
            maturitydatecombobox = new JComboBox();
            rateofinteresttxtfield = new JTextField();
            amounttxtfield = new JTextField();
            maturityamounttxtfield = new JTextField();
            menubar = new JMenuBar();
             menu = new JMenu("File");
             menubar.add(menu);
             menuitem = new JMenuItem("New");
             menu.add(menuitem);
             menuitem.addActionListener(this);
             menuitem = new JMenuItem("Save");
             menu.add(menuitem);
             menuitem.addActionListener(this);
             menuitem = new JMenuItem("Close");
             menu.add(menuitem);
             menuitem.addActionListener(this);
             menuitem = new JMenuItem("Exit");
             menu.add(menuitem);
             menuitem.addActionListener(this);
             menu = new JMenu("Edit");
             menubar.add(menu);
             menuitem = new JMenuItem("View FD");
             menu.add(menuitem);
             menuitem.addActionListener(this);
            mainpanel = new JPanel(new BorderLayout());
            menupanel = new JPanel(new BorderLayout());
            menupanel.add(menubar);
             userinputpanel = new JPanel(new GridLayout(8,2,5,20));
            userinputpanel.setBorder(BorderFactory.createEmptyBorder(50,50,80,80));
            userinputpanel.add(fdnumber);
            userinputpanel.add(fdnumbertxtfield);
            fdnumbertxtfield.setColumns(50);
            userinputpanel.add(bankname);
            userinputpanel.add(banknamecombobox);
            userinputpanel.add(beneficiaryname);
            userinputpanel.add(beneficiarynametxtfield);
            beneficiarynametxtfield.setColumns(50);
            userinputpanel.add(rateofinterest);
            userinputpanel.add(rateofinteresttxtfield);
            rateofinteresttxtfield.setColumns(50);
            userinputpanel.add(amount);
            userinputpanel.add(amounttxtfield);
            amounttxtfield.setColumns(50);
            userinputpanel.add(maturityamount);
            userinputpanel.add(maturityamounttxtfield);
            maturityamounttxtfield.setColumns(50);
            savebutton = new JButton("Save");
            clearbutton = new JButton("Clear");
            JPanel buttonpanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
            buttonpanel.add(savebutton);
            buttonpanel.add(clearbutton);
            savebutton.addActionListener(this);
            clearbutton.addActionListener(this);
            mainpanel.add(menupanel,BorderLayout.NORTH);
            mainpanel.add(userinputpanel,BorderLayout.CENTER);
            mainpanel.add(buttonpanel,BorderLayout.SOUTH);
            frame = new JFrame("Enter FD");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setSize(3000,3000);
            frame.setContentPane(mainpanel);
            frame.pack();
            frame.setVisible(true); }

  • Own tag in code templates of the abap editor

    Hi,
    i think you all know the code hints and that you can define own code templates in the abap editor (at the options screen). As an information I dont mean the code patterns.
    So does somebody know how to define own tags for these code templates? Or where the logic is located for the code hints?
    Bye
    Richard

    Hi Richard,
    I know its pretty late to answer the question but just in case if you have not figured it out then see,
    Regards,
    Ankit.

  • How to disappear the combobox

    I try the following code and i got some trouble.
    if I select the value in combobox (different value), the combobox will disappear.
    But when I select the default value, the combobox will not disappear.
    So, how can I disappear the combobox when user select the default value
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.table.*;
    public class TableComboBoxByRow extends JFrame
         ArrayList editors = new ArrayList(3);
         public TableComboBoxByRow()
              // Create the editors to be used for each row
              String[] items1 = { "Red", "Blue", "Green" };
              JComboBox comboBox1 = new JComboBox( items1 );
              DefaultCellEditor dce1 = new DefaultCellEditor( comboBox1 );
              editors.add( dce1 );
              String[] items2 = { "Circle", "Square", "Triangle" };
              JComboBox comboBox2 = new JComboBox( items2 );
              DefaultCellEditor dce2 = new DefaultCellEditor( comboBox2 );
              editors.add( dce2 );
              String[] items3 = { "Apple", "Orange", "Banana" };
              JComboBox comboBox3 = new JComboBox( items3 );
              DefaultCellEditor dce3 = new DefaultCellEditor( comboBox3 );
              editors.add( dce3 );
              //  Create the table with default data
              Object[][] data =
                   {"Color", "Red"},
                   {"Shape", "Square"},
                   {"Fruit", "Banana"},
                   {"Plain", "Text"}
              String[] columnNames = {"Type","Value"};
              DefaultTableModel model = new DefaultTableModel(data, columnNames);
              JTable table = new JTable(model)
                   //  Determine editor to be used by row
                   public TableCellEditor getCellEditor(int row, int column)
                        int modelColumn = convertColumnIndexToModel( column );
                        if (modelColumn == 1 && row < 3)
                             return (TableCellEditor)editors.get(row);
                        else
                             return super.getCellEditor(row, column);
              JScrollPane scrollPane = new JScrollPane( table );
              getContentPane().add( scrollPane );
         public static void main(String[] args)
              TableComboBoxByRow frame = new TableComboBoxByRow();
              frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
              frame.pack();
              frame.setVisible(true);
    }

    The following modification seems to work...
              final JTable table = new JTable(model)
              getContentPane().add( scrollPane );
              PopupMenuListener stopEditing = new PopupMenuListener() {
                   public void popupMenuWillBecomeVisible( PopupMenuEvent e ) {}
                   public void popupMenuWillBecomeInvisible( PopupMenuEvent e ) {
                        TableCellEditor editor = table.getCellEditor();
                        if ( editor != null )
                             editor.stopCellEditing();
                   public void popupMenuCanceled( PopupMenuEvent e ) {}
              comboBox1.addPopupMenuListener( stopEditing );
              comboBox2.addPopupMenuListener( stopEditing );
              comboBox3.addPopupMenuListener( stopEditing );          
         }

  • How to align the item text in the combobox vertically centred after increasing the height of the combobox in mfc?

    I want to make the item text of the combobox to  be aligned vertically(Centred) . Actually I increased the height 
    of the combobox and after the increasing the combobox height, the text is not centred vertically.The code
    snippet for increasing the height is as follows,
    m_SpecifyCombo.SetItemHeight(-1,20);//CCombobox m_SpecifyCombo
    After increasing the height the text in the combobox is not in the centre as shown in the below image,
    But I want the text to be centred as shown in the below image.
    Code snippet for owner drawn combobox:
    #if !defined(AFX_CUSTCOMBOBOX_H__F8528B4F_396E_11D1_9384_00A0248F6145__INCLUDED_)
    #define AFX_CUSTCOMBOBOX_H__F8528B4F_396E_11D1_9384_00A0248F6145__INCLUDED_
    #if _MSC_VER >= 1000
    #pragma once
    #endif // _MSC_VER >= 1000
    typedef enum {FONTS} STYLE; //Why have I enumerated, Cos, Maybe I might want something other than Fonts here
    class COwnerDrawCombo : public CComboBox
    // Construction
    public:
    COwnerDrawCombo();
    COwnerDrawCombo (STYLE);
    // Attributes
    public:
    void SetHilightColors (COLORREF hilight,COLORREF hilightText)
    m_clrHilight = hilight;
    m_clrHilightText = hilightText;
    void SetNormalColors (COLORREF clrBkgnd,COLORREF clrText)
    m_clrNormalText = clrText;
    m_clrBkgnd = clrBkgnd;
    static BOOL CALLBACK EnumFontProc (LPLOGFONT lplf, LPTEXTMETRIC lptm, DWORD dwType, LPARAM lpData);
    void FillFonts ();
    int GetSelFont (LOGFONT&);
    // Operations
    public:
    // Overrides
    // ClassWizard generated virtual function overrides
    //{{AFX_VIRTUAL(CCustComboBox)
    public:
    virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
    virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct);
    protected:
    virtual void PreSubclassWindow();
    //}}AFX_VIRTUAL
    // Implementation
    public:
    virtual ~COwnerDrawCombo();
    // Generated message map functions
    protected:
    STYLE m_enStyle;
    COLORREF m_clrHilight;
    COLORREF m_clrNormalText;
    COLORREF m_clrHilightText;
    COLORREF m_clrBkgnd;
    BOOL m_bInitOver;
    void DrawDefault (LPDRAWITEMSTRUCT);
    void DrawFont(LPDRAWITEMSTRUCT);
    void InitFonts ();
    //{{AFX_MSG(CCustComboBox)
    afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
    afx_msg void OnDestroy();
    //}}AFX_MSG
    afx_msg long OnInitFonts (WPARAM, LPARAM);
    DECLARE_MESSAGE_MAP()
    //{{AFX_INSERT_LOCATION}}
    // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
    #endif //!defined(AFX_CUSTCOMBOBOX_H__F8528B4F_396E_11D1_9384_00A0248F6145__INCLUDED_)
    // OwnerDrawCombo.cpp : implementation file
    #include "stdafx.h"
    #include "combobox.h"
    #include "OwnerDrawCombo.h"
    #ifdef _DEBUG
    #define new DEBUG_NEW
    #undef THIS_FILE
    static char THIS_FILE[] = __FILE__;
    #endif
    #define WM_INITFONTS (WM_USER + 123)
    //I chose 123 cos nobody might use the same exact number.. I can improve this by use RegisterWindowMessage..
    // COwnerDrawCombo
    //Initial values of the text and highlight stuff
    COwnerDrawCombo::COwnerDrawCombo()
    m_enStyle = FONTS;
    m_clrHilight = GetSysColor (COLOR_HIGHLIGHT);
    m_clrNormalText = GetSysColor (COLOR_WINDOWTEXT);
    m_clrHilightText = GetSysColor (COLOR_HIGHLIGHTTEXT);
    m_clrBkgnd = GetSysColor (COLOR_WINDOW);
    m_bInitOver = FALSE;
    COwnerDrawCombo::COwnerDrawCombo (STYLE enStyle)
    m_enStyle = enStyle;
    m_clrHilight = GetSysColor (COLOR_HIGHLIGHT);
    m_clrNormalText = GetSysColor (COLOR_WINDOWTEXT);
    m_clrHilightText = GetSysColor (COLOR_HIGHLIGHTTEXT);
    m_clrBkgnd = GetSysColor (COLOR_WINDOW);
    m_bInitOver =FALSE;
    COwnerDrawCombo::~COwnerDrawCombo()
    BEGIN_MESSAGE_MAP(COwnerDrawCombo, CComboBox)
    //{{AFX_MSG_MAP(COwnerDrawCombo)
    ON_WM_CREATE()
    ON_WM_DESTROY()
    //}}AFX_MSG_MAP
    ON_MESSAGE (WM_INITFONTS,OnInitFonts)
    END_MESSAGE_MAP()
    // COwnerDrawCombo message handlers
    void COwnerDrawCombo::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
    //I might want to add something else someday
    switch (m_enStyle)
    case FONTS:
    DrawFont(lpDrawItemStruct);
    break;
    //I dont need the MeasureItem to do anything. Whatever the system says, it stays
    void COwnerDrawCombo::MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct)
    void COwnerDrawCombo::DrawFont(LPDRAWITEMSTRUCT lpDIS)
    CDC* pDC = CDC::FromHandle(lpDIS->hDC);
    CRect rect;
    TRACE0 ("In Draw Font\n");
    // draw the colored rectangle portion
    rect.CopyRect(&lpDIS->rcItem);
    pDC->SetBkMode( TRANSPARENT );
    if (lpDIS->itemState & ODS_SELECTED)
    pDC->FillSolidRect (rect,m_clrHilight);
    pDC->SetTextColor (m_clrHilightText);
    else
    pDC->FillSolidRect (rect,m_clrBkgnd);
    pDC->SetTextColor (m_clrNormalText);
    if ((int)(lpDIS->itemID) < 0) // Well its negetive so no need to draw text
    else
    CString strText;
    GetLBText (lpDIS->itemID,strText);
    CFont newFont;
    CFont *pOldFont;
    ((LOGFONT*)lpDIS->itemData)->lfHeight = 90; //9 point size
    ((LOGFONT*)lpDIS->itemData)->lfWidth = 0;
    newFont.CreatePointFontIndirect ((LOGFONT*)lpDIS->itemData);
    pOldFont = pDC->SelectObject (&newFont);
    pDC->DrawText(strText, rect, DT_LEFT | DT_VCENTER | DT_SINGLELINE);
    pDC->SelectObject (pOldFont);
    newFont.DeleteObject ();
    void COwnerDrawCombo::InitFonts ()
    CDC *pDC = GetDC ();
    ResetContent (); //Delete whatever is there
    EnumFonts (pDC->GetSafeHdc(),NULL,(FONTENUMPROC) EnumFontProc,(LPARAM)this);//Enumerate
    m_bInitOver = TRUE;
    BOOL CALLBACK COwnerDrawCombo::EnumFontProc (LPLOGFONT lplf, LPTEXTMETRIC lptm, DWORD dwType, LPARAM lpData)
    if (dwType == TRUETYPE_FONTTYPE) //Add only TTF fellows, If you want you can change it to check for others
    int index = ((COwnerDrawCombo *) lpData)->AddString(lplf->lfFaceName);
    LPLOGFONT lpLF;
    lpLF = new LOGFONT;
    CopyMemory ((PVOID) lpLF,(CONST VOID *) lplf,sizeof (LOGFONT));
    ((COwnerDrawCombo *) lpData)->SetItemData (index,(DWORD) lpLF);
    return TRUE;
    int COwnerDrawCombo::OnCreate(LPCREATESTRUCT lpCreateStruct)
    if (CComboBox::OnCreate(lpCreateStruct) == -1)
    return -1;
    // TODO: Add your specialized creation code here
    if (m_enStyle == FONTS)
    //SetItemHeight(-1,30);
    PostMessage (WM_INITFONTS,0,0);
    return 0;
    long COwnerDrawCombo::OnInitFonts (WPARAM, LPARAM)
    InitFonts ();
    return 0L;
    void COwnerDrawCombo::OnDestroy()
    if (m_enStyle == FONTS)
    int nCount;
    nCount = GetCount ();
    for (int i = 0; i < nCount; i++)
    delete ((LOGFONT*)GetItemData (i)); //delete the LOGFONTS actually created..
    // TODO: Add your message handler code here
    CComboBox::OnDestroy();
    void COwnerDrawCombo::FillFonts ()
    m_enStyle = FONTS;
    PostMessage (WM_INITFONTS,0,0); //Process in one place
    int COwnerDrawCombo::GetSelFont (LOGFONT& lf)
    int index = GetCurSel ();
    if (index == LB_ERR)
    return LB_ERR;
    LPLOGFONT lpLF = (LPLOGFONT) GetItemData (index);
    CopyMemory ((PVOID)&lf, (CONST VOID *) lpLF, sizeof (LOGFONT));
    return index; //return the index here.. Maybe the user needs it:-)
    void COwnerDrawCombo::PreSubclassWindow()
    // TODO: Add your specialized code here and/or call the base class
    //Tried to do what Roger Onslow did for the button.. Did not work..?? Any R&D guys around :-)
    Can anyone please let me know how can I achieve this.
    Any help can be appreciated.
    Thanks in advance
    SivaV

    Hi sivavuyyuru,
    I cannot find a easy way to make this.
    I think you may need to draw your own Combo Box control. And you could change the edit control more like static text. Check the article:
    http://www.codeguru.com/cpp/controls/combobox/fontselectioncombos/article.php/c1795/Owner-Drawn-Font-Selection-Combobox.htm
    In the resource editor, Owner draw -> variable , Has string->true, type->drop list.
    The result:
    Best regards,
    Shu Hu
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Problem with comboBox editor

    Hi experts,
    i am keeping a combobox renderer and editor in my JTable for 2 columns say 5th column and 7th column.
    In renderer no Problem.
    But while i am editing ,whenever i am choosing a perticular item from the drop down in the first row of table,it is affecting the remaining set of rows.,not all the rows also.
    for example,next 5 rows are getting the same selected value.
    next some 2 rows are getting affected.
    the below 2 class are my renderer and editor.public class ComboBoxRenderer extends JComboBox implements TableCellRenderer {
            public ComboBoxRenderer(String[] items) {
                            super(items);
            public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
                    if (isSelected) {
                    // Select the current value
                    setSelectedItem(value);
                    return this;
    }My ComboBox editor is public class ComboBoxEditor extends DefaultCellEditor {
            public ComboBoxEditor(String[] items) {
                   super(new JComboBox(items));
    }so i am using this render and editor in my swing screen by the following codeString strSP[] = {"P", "O", "H", " "};
    column5.setCellEditor(new ComboBoxEditor(strSP));
    column5.setCellRenderer(new ComboBoxRenderer(strSP));I am sure like the problem with my renderer and editoronly,but i am helpless.
    Please if someone help me to come out of this problem,it will be much helpful for me .
    thanks

    Hi,
    Thanks for u'r reply
    I tried in so many ways.
    I tried with u'r editor,and sun forum examples also.
    I brief what i want.
    I am having table with 3 column.
    The zeroth col, and the 2 col is a combo box.so i am rendering.
    when i choose a one from zeroth col combo Box ,the 2nd col ComboBox value has to change into YES
    when i choose a apart from one from zeroth col combo Box ,the 2nd col combo Box value has to change into NO.
    Here my Problem is
    When ever i am choosing the particular value from the 1st combo box,it is affecting the all the combobox values below(set of values,not all)..To solve that i kept the commented line in the renderer but it is creating the new problem.
    I am very seriously working to solve this problem,if any one suggest to solve this,it will be very much helpful to me.
    I am posting my code belowimport java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.TableModelEvent;
    import javax.swing.event.TableModelListener;
    import javax.swing.table.*;
    public class TableComboBox extends JFrame implements TableModelListener
         public JTable table;
            DefaultTableModel model = null;
            JComboBox editor2 = null;
         public TableComboBox()
              Object[][] data = { {" ", "A" , " "}, {" ", "B", " "}, {" ", "C", " "}, {" ", "D", " "}, {" ", "E", " "}, {" ", "F", " "}, {" ", "G", " "}, {" ", "H", " "}  };
                    String[] columnNames = {"FIRST","SECOND", "THIRD" };
                    String[] column0Items = { "one", "two", "three", "four" };
                    String column2Items[] = {"YES","NO"};
              model = new DefaultTableModel(data, columnNames);
                    model.addTableModelListener(this);
              table = new JTable(model);
              //  Set the Zeroth column to use a combobox as its editor,renderer
                    table.getColumnModel().getColumn(0).setCellRenderer(new ComboBoxRenderer(column0Items));
              table.getColumnModel().getColumn(0).setCellEditor(new ComboBoxEditor(column0Items));
                    //  Set the second column to use a combobox as its editor,renderer
                    table.getColumnModel().getColumn(2).setCellRenderer(new ComboBoxRenderer(column2Items));
              table.getColumnModel().getColumn(2).setCellEditor(new ComboBoxEditor(column2Items));
                    JScrollPane scrollPane = new JScrollPane( table );
              getContentPane().add( scrollPane );
             public void tableChanged(TableModelEvent e) {
                    int row = e.getFirstRow();
                    int column = e.getColumn();
                    if(e.getType() == TableModelEvent.INSERT) {
                    if (e.getType() == TableModelEvent.UPDATE) {
                            if(table.getEditingRow() != table.getSelectedRow())
                                    ((DefaultCellEditor)table.getCellEditor()).cancelCellEditing();                      
                   if ( column == 0 ) {
                                    if(model.getValueAt(row, 0).equals("one")) {
                                            model.setValueAt("YES", row, 2);
                                    } else if(model.getValueAt(row, 0).equals("two")){
                                            model.setValueAt("NO", row, 2);
                                    } else if(model.getValueAt(row, 0) == "three"){
                                            model.setValueAt("NO", row, 2);
                                    } else if(model.getValueAt(row, 0) == "four"){
                                            model.setValueAt("NO", row, 2);
                           }else{
                                    //do nothing
         public static void main(String[] args)
              final TableComboBox frame = new TableComboBox();
              frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
              frame.pack();
              frame.setVisible(true);
            class ComboBoxRenderer extends JComboBox implements TableCellRenderer {
                    String items[];
                    public ComboBoxRenderer(String[] items) {
                                    super(items);
                                    this.items = items;
                    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
                                   if(isSelected){
                                            setSelectedItem(value.toString());
                                            return this;
                                    }/*else{
                                            setSelectedItem(items[0]));
                            return this;
            class ComboBoxEditor extends DefaultCellEditor {
                    public ComboBoxEditor(String[] items) {
                           super(new JComboBox(items));
            }

  • I just purchased an IMac with lion and I tryed to install an old math program that is for winmac running systems. When I try to boot the cd it comes up with a notepad window with a bunch of weird symbols and codes but the program will not start up.

    I just purchase my first IMac with lion and I was trying to install a math program I bought 6 years ago. When I went to boot it off the disk while following the program instructions a window popped up with a note pad format with symbols and codes but the program would not download or open. How do I get this program to work? It is a mac compatible program by the way.

    Your Mac probably does not know with which application to open the file and is opening a file with a text editor that really needs to be opened by the application itself.  Try starting the application first, then use the File > open command to open the file.
    As varjak paw comments, there isn't a "winmac" so that's not telling us anything.
    Note that it is possible that software purchased 6 years ago may no longer run on your computer.  Once we know what it is we can help more.

  • How to display the values stored in the database in the combobox on load?

    I am develping one application where in
    I wanted to display the values in the combobox which I am taking from the database and in the same form passing that value in same form after selecting it,My program is running fine for the first time but next time it is giving me NullPointerException.
    So can anyone tell me please how I should develop the this application to avoid this exception?
    Thank You
    Praddy

    Thanx a lot for showing interest in answering my query.I am pasting my code for ur reference.Please try to reply ASAP.
    Thank You,
    Praddy.
    CODE:
    ======
    <html>
    <head>
         <script language="javascript">
              function submitthisform(thisForm)
                   thisForm.submit();                    
         </script>
    </head>
    <body>
    <form method=post name=samepgm>
    Select City:     <select name=city onChange='submitthisform(samepgm)'><br><br><br>
    <option value=''></option>
    <option value='All'>All</option>
    <%@ page language="java" import="java.sql.*" %>
    <%
              String scity = request.getParameter("city");
              System.out.println(scity);
              Connection con = null;
              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              con = DriverManager.getConnection("jdbc:odbc:property","","");
              Statement st = con.createStatement();          
              ResultSet rs1 = st.executeQuery("select distinct hcity from housefinance");
              while(rs1.next())
                   //String ohname = rs1.getString("hname");     
                   String     ocity = rs1.getString("hcity");     
                   //out.println(ohname +"<br>");
                   out.println(ocity +"<br>");
    %>
    <br><br><br><option value='<%=ocity%>'><%=ocity%></option><br>
    <%               }
                   rs1.close();
              if(scity.equals("All"))
              ResultSet rs2 = st.executeQuery("select * from housefinance");      
              while(rs2.next())
                   String     ohname = rs2.getString("hname");     
                   String     ohadd1 = rs2.getString("hadd1");
                   //String ohadd2 = rs2.getString("hadd2");
                   String     ohcity = rs2.getString("hcity");
                   String     ohpcode = rs2.getString("hpcode");
                   String     ohtelno = rs2.getString("htelno");
                   String     ohfaxno = rs2.getString("hfaxno");
                   String     ohemail = rs2.getString("hemail");
                   String     ohmobile = rs2.getString("hmobile");     
    %>
    <pre>
    <tr>
    <td><p>Company          :     <%=ohname%> </p></td>
    <td><p>Address          :     <%=ohadd1%></p></td>
    <td><p>City          :     <%=ohcity%> </p></td>
    <td><p>Pin          :     <%=ohpcode%></p></td>
    <td><p>Telphone          :     <%=ohtelno%></p></td>
    <td><p>Fax No:          :     <%=ohfaxno%></p></td>
    <td><p>Email          :     <%=ohemail%></p></td>
    <td><p>Mobile No.     :     <%=ohmobile%></p></td>
    </tr>
    </pre>
    <%
              else
    ResultSet rs = st.executeQuery("select * from housefinance where hcity like '%"+scity+"%'");
              while(rs.next())
                   String     ohname = rs.getString("hname");     
                   String     ohadd1 = rs.getString("hadd1");
                   //String ohadd2 = rs.getString("hadd2");
                   String     ohcity = rs.getString("hcity");
                   String     ohpcode = rs.getString("hpcode");
                   String     ohtelno = rs.getString("htelno");
                   String     ohfaxno = rs.getString("hfaxno");
                   String     ohemail = rs.getString("hemail");
                   String     ohmobile = rs.getString("hmobile");     
    %>
    <tr>
    <td><p>Company          :     <%=ohname%> </p></td>
    <td><p>Address          :     <%=ohadd1%></p></td>
    <td><p>City          :     <%=ohcity%> </p></td>
    <td><p>Pin          :     <%=ohpcode%></p></td>
    <td><p>Telphone          :     <%=ohtelno%></p></td>
    <td><p>Fax No:          :     <%=ohfaxno%></p></td>
    <td><p>Email          :     <%=ohemail%></p></td>
    <td><p>Mobile No.     :     <%=ohmobile%></p></td>
    </tr>
    <hr>
    <%               }
    %>
    </select>
    </form>
    </body>
    </html>

  • In the expression editor dialog box my TAB key doesn't function correctly

    This is bizarre behavior that seems to have started recently.
    In Visual Studio 2012, an SSRS project, any expression editor dialog:
    The tab key doesn't work right.
    Open the expression editor and:
    * I see a blinking cursor and I can type in the expression box.
    * If I hit the tab key, the cursor disappears and I cannot type.  I appear to lose focus in the editor but focus doesn't appear to go anywhere else in the dialog box.
    * If I hit the tab key a 2nd time, the cursor is still gone and I cannot type. 
    * If I hit the tab key a 3rd time, I can finally type again and note that I am now
    3 tabstops in.  In other words it seems like the tabs were working but I lost the ability to type anything until I "tab" 3 magical times. 
    I can work around this by hitting tab key then grabbing the mouse and clicking where the cursor SHOULD be which returns focus to the text area.
    Hopefully this image helps clarify:
    Anybody know what is wrong?
    Microsoft Visual Studio Professional 2012
    Version 11.0.61030.00 Update 4
    Microsoft .NET Framework
    Version 4.5.50709
    Installed Version: Professional
    LightSwitch for Visual Studio 2012   04938-004-0034007-02367
    Microsoft LightSwitch for Visual Studio 2012
    Office Developer Tools   04938-004-0034007-02367
    Microsoft Office Developer Tools
    Team Explorer for Visual Studio 2012   04938-004-0034007-02367
    Microsoft Team Explorer for Visual Studio 2012
    Visual Basic 2012   04938-004-0034007-02367
    Microsoft Visual Basic 2012
    Visual C# 2012   04938-004-0034007-02367
    Microsoft Visual C# 2012
    Visual C++ 2012   04938-004-0034007-02367
    Microsoft Visual C++ 2012
    Visual F# 2012   04938-004-0034007-02367
    Microsoft Visual F# 2012
    Visual Studio 2012 Code Analysis Spell Checker   04938-004-0034007-02367
    Microsoft® Visual Studio® 2012 Code Analysis Spell Checker
    Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.
    The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.
    Visual Studio 2012 SharePoint Developer Tools   04938-004-0034007-02367
    Microsoft Visual Studio 2012 SharePoint Developer Tools
    ASP.NET and Web Tools   2012.3.41009
    Microsoft Web Developer Tools contains the following components:
    Support for creating and opening ASP.NET web projects
    Browser Link: A communication channel between Visual Studio and browsers
    Editor extensions for HTML, CSS, and JavaScript
    Page Inspector: Inspection tool for ASP.NET web projects
    Scaffolding: A framework for building and running code generators
    Server Explorer extensions for Windows Azure Web Sites
    Web publishing: Extensions for publishing ASP.NET web projects to hosting providers, on-premises servers, or Windows Azure
    Color Theme Designer   1.0
    Designer for creating new color themes
    NuGet Package Manager   2.8.50126.400
    NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.
    PreEmptive Analytics Visualizer   1.0
    Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.
    SQL Server Analysis Services   
    Microsoft SQL Server Analysis Services Designer 
    Version 11.0.3369.0
    SQL Server Data Tools   11.1.40706.0
    Microsoft SQL Server Data Tools
    SQL Server Integration Services   
    Microsoft SQL Server Integration Services Designer
    Version 11.0.3369.0
    SQL Server Reporting Services   
    Microsoft SQL Server Reporting Services Designers 
    Version 11.0.3369.0
    BIDSHelper
    BIDS Helper 2012 - An add-in to extend SQL Server Data Tools - Business Intelligence (SSDTBI formerly BI Development Studio)
    (c) 2014 Version 1.6.6.0
    http://www.codeplex.com/bidshelper
    SQL Prompt 6
    For more information about SQL Prompt, see the Red Gate website at
    http://www.red-gate.com
    For customer support, call 1-866-733-4283.
    Copyright © 2006–2009 Red Gate Software Ltd

    Hi Bostaevski,
    Thank you for posting in MSDN forum.
    According to your description, as you said that the cursor disappears and cannot type issue. It seems that the issue may be not Visual Studio the VS IDE issue.
    In addition, I find a similar thread about the
    Expression Editor Cursor Issue,
    please see:  
    http://www.beta.microsoft.com/VisualStudio/feedbackdetail/view/780682/vs-2012-rdlc-expression-editor-cursor-issue#.
    Therefore, I suggest you could also try to press alt with left and right arrow keys and check if it is works fine.
    Thnank for your understanding!
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to clear the text in the Text Editor

    Hi all,
    I created a Text editor and also i am having language field in the screen.
    whenever i change the language auomatically the text has to change when the text exists for that
    language.
    this is working fine, but when the Text exist , the text editor should be blank.
    But it is carrying the Previous editor text itself into it .
    How to clear the text in the Editor.
    Regards,
    Madhavi

    Hello Madhavi
    The simple report ZUS_SDN_TEXTEDIT_CONTROL shows how to switch the texteditor contents when changing the language.
    *& Report  ZUS_SDN_TEXTEDIT_CONTROL
    *& Thread: how to clear the text in the Text Editor
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1145272"></a>
    *& By default the itab GT_OUTTAB contains texts in DE and EN.
    *& To switch the language directly enter into the command window:
    *& LANGU=DE, LANGU=EN or LANGU=FR
    REPORT  zus_sdn_textedit_control.
    TYPE-POOLS: abap.
    TYPES: ty_t_text     TYPE TABLE OF as4text
                         WITH DEFAULT KEY.
    TYPES: BEGIN OF ty_s_outtab.
    TYPES: language TYPE spras.
    TYPES: text     TYPE ty_t_text.
    TYPES: END OF ty_s_outtab.
    TYPES: ty_t_outtab    TYPE STANDARD TABLE OF ty_s_outtab
                          WITH DEFAULT KEY.
    DATA: gt_outtab       TYPE ty_t_outtab,
          gs_outtab       TYPE ty_s_outtab.
    DATA: gd_language     TYPE spras.
    DATA: go_docking      TYPE REF TO cl_gui_docking_container,
          go_textedit     TYPE REF TO cl_gui_textedit.
    DATA: gd_okcode       TYPE ui_func,
          gd_repid        TYPE syst-repid.
    START-OF-SELECTION.
      PERFORM fill_texts.
      gd_language = syst-langu.
      PERFORM init_controls.
    * Link the docking container to the target dynpro
      gd_repid  = syst-repid.
      CALL METHOD go_docking->link
        EXPORTING
          repid                       = gd_repid
          dynnr                       = '0100'
    *      CONTAINER                   =
        EXCEPTIONS
          OTHERS                      = 4.
      IF sy-subrc NE 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      PERFORM set_text_editor.
    * NOTE: dynpro does not contain any elements
      "       ok-code => GD_OKCODE
      CALL SCREEN '0100'.
    * Flow logic of dynpro (does not contain any dynpro elements):
    *PROCESS BEFORE OUTPUT.
    *  MODULE STATUS_0100.
    *PROCESS AFTER INPUT.
    *  MODULE USER_COMMAND_0100.
    END-OF-SELECTION.
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'STATUS_0100'.  " contains push button "DETAIL"
    *  SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE user_command_0100 INPUT.
      TRANSLATE gd_okcode TO UPPER CASE.
      CASE gd_okcode.
        WHEN 'BACK'  OR
             'EXIT'  OR
             'CANC'.
          SET SCREEN 0. LEAVE SCREEN.
        WHEN 'LANGU=DE' OR
             'LANGU=EN' OR
             'LANGU=FR'.
          PERFORM get_text_editor.
          SPLIT gd_okcode AT '=' INTO gd_okcode gd_language.
          PERFORM set_text_editor.
        WHEN OTHERS.
      ENDCASE.
      CLEAR: gd_okcode.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Form  FILL_TEXTS
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM fill_texts .
    * define local data
      DATA: ld_string   TYPE string.
      gs_outtab-language = 'EN'. REFRESH: gs_outtab-text.
      ld_string = 'Good morning'.
      APPEND ld_string TO gs_outtab-text.
      APPEND gs_outtab TO gt_outtab.
      gs_outtab-language = 'DE'. REFRESH: gs_outtab-text.
      ld_string = 'Guten Morgen'.
      APPEND ld_string TO gs_outtab-text.
      APPEND gs_outtab TO gt_outtab.
      gs_outtab-language = 'FR'. REFRESH: gs_outtab-text.
      ld_string = space.
      APPEND ld_string TO gs_outtab-text.
      APPEND gs_outtab TO gt_outtab.
    ENDFORM.                    " FILL_TEXTS
    *&      Form  INIT_CONTROLS
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM init_controls .
      CREATE OBJECT go_docking
        EXPORTING
          parent                      = cl_gui_container=>screen0
    *      repid                       =
    *      dynnr                       =
    *      side                        = dock_at_left
    *      extension                   = 50
    *      style                       =
    *      lifetime                    = lifetime_default
    *      caption                     =
    *      metric                      = 0
          ratio                       = 90
    *      no_autodef_progid_dynnr     =
    *      name                        =
        EXCEPTIONS
          cntl_error                  = 1
          cntl_system_error           = 2
          create_error                = 3
          lifetime_error              = 4
          lifetime_dynpro_dynpro_link = 5
          OTHERS                      = 6.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CREATE OBJECT go_textedit
        EXPORTING
    *      max_number_chars       =
    *      style                  = 0
    *      wordwrap_mode          = wordwrap_at_windowborder
    *      wordwrap_position      = -1
    *      wordwrap_to_linebreak_mode = false
    *      filedrop_mode          = dropfile_event_off
          parent                 = go_docking
    *      lifetime               =
    *      name                   =
        EXCEPTIONS
          error_cntl_create      = 1
          error_cntl_init        = 2
          error_cntl_link        = 3
          error_dp_create        = 4
          gui_type_not_supported = 5
          OTHERS                 = 6.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " INIT_CONTROLS
    *&      Form  SET_TEXT_EDITOR
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM set_text_editor .
      BREAK-POINT.
      CLEAR: gs_outtab.
      READ TABLE gt_outtab INTO gs_outtab
           WITH KEY language = gd_language.
      CALL METHOD go_textedit->set_text_as_stream
        EXPORTING
          text            = gs_outtab-text
        EXCEPTIONS
          error_dp        = 1
          error_dp_create = 2
          OTHERS          = 3.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " SET_TEXT_EDITOR
    *&      Form  GET_TEXT_EDITOR
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM get_text_editor .
      CLEAR: gs_outtab.
      CALL METHOD go_textedit->get_text_as_stream
        EXPORTING
          only_when_modified     = cl_gui_textedit=>true
        IMPORTING
          text                   = gs_outtab-text
    *      is_modified            =
        EXCEPTIONS
          error_dp               = 1
          error_cntl_call_method = 2
          OTHERS                 = 3.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      MODIFY gt_outtab FROM gs_outtab
        TRANSPORTING text
        WHERE ( language = gd_language ).
    ENDFORM.                    " GET_TEXT_EDITOR
    Regards
      Uwe

  • How can i make that in the ComboBox control it will show only part of each item name without the Win32_ in the start of each item ?

    This is my form1 code:
    using System;
    using System.Collections;
    using System.Management;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;
    namespace GetHardwareInfo
    public partial class frmMain : Form
    public frmMain()
    InitializeComponent();
    cmbxOption.SelectedItem = "Win32_Processor";
    cmbxStorage.SelectedItem = "Win32_DiskDrive";
    cmbxMemory.SelectedItem = "Win32_CacheMemory";
    cmbxSystemInfo.SelectedItem = "";
    cmbxNetwork.SelectedItem = "Win32_NetworkAdapter";
    cmbxUserAccount.SelectedItem = "Win32_SystemUsers";
    cmbxDeveloper.SelectedItem = "Win32_COMApplication";
    cmbxUtility.SelectedItem = "Win32_1394Controller";
    private void InsertInfo(string Key, ref ListView lst, bool DontInsertNull)
    lst.Items.Clear();
    ManagementObjectSearcher searcher = new ManagementObjectSearcher("select * from " + Key);
    try
    foreach (ManagementObject share in searcher.Get())
    ListViewGroup grp;
    try
    grp = lst.Groups.Add(share["Name"].ToString(), share["Name"].ToString());
    catch
    grp = lst.Groups.Add(share.ToString(), share.ToString());
    if (share.Properties.Count <= 0)
    MessageBox.Show("No Information Available", "No Info", MessageBoxButtons.OK, MessageBoxIcon.Information);
    return;
    foreach (PropertyData PC in share.Properties)
    ListViewItem item = new ListViewItem(grp);
    if (lst.Items.Count % 2 != 0)
    item.BackColor = Color.White;
    else
    item.BackColor = Color.WhiteSmoke;
    item.Text = PC.Name;
    if (PC.Value != null && PC.Value.ToString() != "")
    switch (PC.Value.GetType().ToString())
    case "System.String[]":
    string[] str = (string[])PC.Value;
    string str2 = "";
    foreach (string st in str)
    str2 += st + " ";
    item.SubItems.Add(str2);
    break;
    case "System.UInt16[]":
    ushort[] shortData = (ushort[])PC.Value;
    string tstr2 = "";
    foreach (ushort st in shortData)
    tstr2 += st.ToString() + " ";
    item.SubItems.Add(tstr2);
    break;
    default:
    item.SubItems.Add(PC.Value.ToString());
    break;
    else
    if (!DontInsertNull)
    item.SubItems.Add("No Information available");
    else
    continue;
    lst.Items.Add(item);
    catch (Exception exp)
    MessageBox.Show("can't get data because of the followeing error \n" + exp.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Information);
    private void RemoveNullValue(ref ListView lst)
    foreach (ListViewItem item in lst.Items)
    if (item.SubItems[1].Text == "No Information available")
    item.Remove();
    #region Control events ...
    private void cmbxNetwork_SelectedIndexChanged(object sender, EventArgs e)
    InsertInfo(cmbxNetwork.SelectedItem.ToString(), ref lstNetwork, chkNetwork.Checked);
    private void cmbxSystemInfo_SelectedIndexChanged(object sender, EventArgs e)
    InsertInfo(cmbxSystemInfo.SelectedItem.ToString(), ref lstSystemInfo, chkSystemInfo.Checked);
    private void cmbxUtility_SelectedIndexChanged(object sender, EventArgs e)
    InsertInfo(cmbxUtility.SelectedItem.ToString(), ref lstUtility, chkUtility.Checked);
    private void cmbxUserAccount_SelectedIndexChanged(object sender, EventArgs e)
    InsertInfo(cmbxUserAccount.SelectedItem.ToString(), ref lstUserAccount, chkUserAccount.Checked);
    private void cmbxStorage_SelectedIndexChanged(object sender, EventArgs e)
    InsertInfo(cmbxStorage.SelectedItem.ToString(), ref lstStorage, chkDataStorage.Checked);
    private void cmbxDeveloper_SelectedIndexChanged(object sender, EventArgs e)
    InsertInfo(cmbxDeveloper.SelectedItem.ToString(), ref lstDeveloper, chkDeveloper.Checked);
    private void cmbxMemory_SelectedIndexChanged(object sender, EventArgs e)
    InsertInfo(cmbxMemory.SelectedItem.ToString(), ref lstMemory, chkMemory.Checked);
    private void chkHardware_CheckedChanged(object sender, EventArgs e)
    if (chkHardware.Checked)
    RemoveNullValue(ref lstDisplayHardware);
    else
    InsertInfo(cmbxOption.SelectedItem.ToString(), ref lstDisplayHardware, chkHardware.Checked);
    private void cmbxOption_SelectedIndexChanged(object sender, EventArgs e)
    InsertInfo(cmbxOption.SelectedItem.ToString(), ref lstDisplayHardware, chkHardware.Checked);
    private void chkDataStorage_CheckedChanged(object sender, EventArgs e)
    if (chkDataStorage.Checked)
    RemoveNullValue(ref lstStorage);
    else
    InsertInfo(cmbxStorage.SelectedItem.ToString(), ref lstStorage, chkDataStorage.Checked);
    private void chkMemory_CheckedChanged(object sender, EventArgs e)
    if (chkMemory.Checked)
    RemoveNullValue(ref lstMemory);
    else
    InsertInfo(cmbxMemory.SelectedItem.ToString(), ref lstStorage, false);
    private void chkSystemInfo_CheckedChanged(object sender, EventArgs e)
    if (chkSystemInfo.Checked)
    RemoveNullValue(ref lstSystemInfo);
    else
    InsertInfo(cmbxSystemInfo.SelectedItem.ToString(), ref lstSystemInfo, false);
    private void chkNetwork_CheckedChanged(object sender, EventArgs e)
    if (chkNetwork.Checked)
    RemoveNullValue(ref lstNetwork);
    else
    InsertInfo(cmbxNetwork.SelectedItem.ToString(), ref lstNetwork, false);
    private void chkUserAccount_CheckedChanged(object sender, EventArgs e)
    if (chkUserAccount.Checked)
    RemoveNullValue(ref lstUserAccount);
    else
    InsertInfo(cmbxUserAccount.SelectedItem.ToString(), ref lstUserAccount, false);
    private void chkDeveloper_CheckedChanged(object sender, EventArgs e)
    if (chkDeveloper.Checked)
    RemoveNullValue(ref lstDeveloper);
    else
    InsertInfo(cmbxDeveloper.SelectedItem.ToString(), ref lstDeveloper, false);
    private void chkUtility_CheckedChanged(object sender, EventArgs e)
    if (chkUtility.Checked)
    RemoveNullValue(ref lstUtility);
    else
    InsertInfo(cmbxUtility.SelectedItem.ToString(), ref lstUtility, false);
    private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
    linkLabel1.LinkVisited = true;
    System.Diagnostics.Process.Start("http://www.test.net");
    #endregion
    What i get is in the end that in the ComboBox in this case i call it cmbxNetwork i see in it many items all start with Win32_ For example when i click on ComboBox i see the first item is: "Win32_NetworkAdapter"
    Instead Win32_NetworkAdapter i want to see in the ComboBox only: NetworkAdapter But when i select the item it should be selected as Win32_NetworkAdapter but the user should see and select only NetworkAdapter.
    I want to remove as test from the ComboBox items the Win32_ But only that the user will see it without Win32_
    Also in the constructor when i'm doing now: cmbxNetwork.SelectedItem = "Win32_NetworkAdapter"; so instead if i'm doing: cmbxNetwork.SelectedItem = "NetworkAdapter"; it will be enough. THe program will use the "Win32_NetworkAdapter";
    but again what i see and user in the ComboBox as item is only the NetworkAdapter

    Hi Chocolade1972,
    >> I want to remove as test from the ComboBox items the Win32_ But only that the user will see it without Win32_  Also in the constructor when i'm doing now: cmbxNetwork.SelectedItem = "Win32_NetworkAdapter"; so instead if i'm doing:
    cmbxNetwork.SelectedItem = "NetworkAdapter";
    Do you mean that you want the ComboBox show the value of “NetworkAdapter” in the text, but when you refer the value of the cmbxNetwork.SelectedItem, it will be “Win32_NetworkAdapter”? If so, I am afraid that you need create your own ComboboxItem and override
    the ToString() method to return the text you want.
    You could modify the code below for your own achievement.
    public partial class Form0417 : Form
    public Form0417()
    InitializeComponent();
    public class ComboboxItem
    public string Text { get; set; }
    public object Value { get; set; }
    public override string ToString()
    return Text;
    private void Form0417_Load(object sender, EventArgs e)
    ComboboxItem item1 = new ComboboxItem();
    item1.Text = "Processor";
    item1.Value = "Win32_Processor";
    ComboboxItem item2 = new ComboboxItem();
    item2.Text = "DiskDrive";
    item2.Value = "Win32_DiskDrive";
    cmbxOption.Items.Add(item1);
    cmbxOption.Items.Add(item2);
    //MessageBox.Show((cmbxOption.SelectedItem as ComboboxItem).Value.ToString());
    private void cmbxOption_SelectedIndexChanged(object sender, EventArgs e)
    MessageBox.Show((cmbxOption.SelectedItem as ComboboxItem).Value.ToString());
    Best Regards,
    Edward
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • The user '*' preference item in the 'User - 6th Form Students Policy {E03166E7-A848-48B5-AA93-97B848AA9C13}' Group Policy object did not apply because it failed with error code '0x80070003 The system cannot find the path specified.' This error was suppres

    I am looking at an issue with users not getting specific group policies. 
    After searching a number of client computers I found that the following error
    The user '*' preference item in the 'User - 6th Form Students Policy {E03166E7-A848-48B5-AA93-97B848AA9C13}' Group Policy object did not apply because it failed with error code '0x80070003 The system cannot find the path specified.' This error was suppressed.
    I can find the folder in the Sysvol folder on all of the domain controllers. 
    The issue with end users seems to be that the proxy settings for internet explorer is not being applied. 
    Potential problems?
    one folder in sysvol entry is empty 
    \\<server>\SYSVOL\<domain.name>\Policies\{E03166E7-A848-48B5-AA93-97B848AA9C13}\User\microsoft\IEAK\LOCK
    or is this our issue
    The old method of configuring proxy settings  to Internet Explorer 9 has changed?
    https://support2.microsoft.com/kb/2530309?wa=wsignin1.0 
    http://thommck.wordpress.com/2013/11/08/the-new-way-to-configure-internet-explorer-proxy-settings-with-group-policy/

    Hi all 
    In administering this policy I am a little confused. 
    We have a policy that distributes proxy settings in the internet explorer maintenance settings section - however when opening this policy up in GPO editor the internet explorer maintenance section is not present.
    I plan to apply the settings via User/preferences/control panel settings/ internet settings (or registry settings from article) however I am unable to edit the settings for internet explorer maintenance and these will persist. Ideas????

  • Error Code 0x80070035 - The network path was not found, Windows Server 2008 SP2

    I have bee receiving following "error code 0x80070035 - The network path was not found" when trying to open file shares in both directions using Windows Server 2008 Standard SP2 at both ends. The issue is identical to the KB article KB958285, however the hotfix is only valid up to but not including SP2. One of the servers in question has moved several times between 2 subnets seperated by a VPN. I have tried changing settings in and around the local NIC/DNS Suffix and in the network connection sharing centre, but with no luck. Firewalls are turned off at both sites, and pings and AD queries are successful (one server is a DC). DNS is also working correctly at both sites. Any help/suggestions would be appreciated.
    Richard

    I thought I would add in another scenario, since this link came to the top of my list in the search engine.
    We are running 2008 R2 with SP1 (it happened without SP1 as well)
    We could not map using UNC (IP, FQDN, or netbios name).  We could ping access the other servers via other utils like event viewer and services.msc but just could not map.
    In our case it turned out to be a VMWARE issue but we still had to make a regedit change first
    You have to go to regedit HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\Order\
    And add LanmanWorkstation to Providerorder
    I found on a Citrix board that citrix has an issue with this as well
    If you're running VM  here is an additional step you should do as well
    When you upgrade VMware Tools installed with HGFS from ESX 3.x to ESX 4.x, the HGFS driver may not get uninstalled properly. In this case, the virtual machine's network Provider Order tab in Network Connections
    > Advanced > Advanced Settings displays incorrect information and the virtual machine may lose network connectivity.
    To avoid this issue, uninstall VMware Tools 3.x before installing VMware Tools 4.x.
    To workaround this issue, if you have already upgraded VMware Tools:
    Click Start >
    Run, type regedit, and click OK. The Registry Editor window opens.
    Navigate to
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\Order\.
    Delete the reference to
    hgfs.
    Reboot the virtual machine.
    We found that if you strip out the HGFS, you do not have to reboot for the provider order tab to come back
    I hope that this saves people a lot of time.   I spent days researching this.
    This was the solution for me on 2008 R2 DC w/ Exchange.  I do not have VMWare installed but do have Hyper-V.  Thank you so much!

Maybe you are looking for

  • Home sharing between Apple TV 2 & Windows 8

    I have my Apple ID on both devices but can't see my computer on Apple TV. Tried everything available on the support websites. Is there something else I can do other than smash it over the wall? Thats the only thing I haven't tried so far! I also trie

  • How can I find out what email is connected to my apple ID account

    Trying to download an app onto my iphone but can't remember my password. tried to retrieve my password but nothing has been sent to my email. tried several times. is there anyway to see what email is connected to my apple ID account? I've tried all o

  • Flash file won't open

    I saved and compacted my .fla the other day and the wheel never stopped spinning. I force quit/restarted and still, it loads up and never gives me any kind of window describing any problem -- but I never see an image and the wheel just keeps spinning

  • Flashing charging light on nokia e7

    if my e7 discharges till its battry empty it drives me crazy,when you connect the charger it flashes for seconds then displays the big NOKIA then the charging light becomes solid and when it finishes displaying the dots on the screen the charging lig

  • Mutiplication result is wrong in query

    Hello All,              I created a multiprovider on inventory cube (0IC_C03) and 0COPC_C08 and i created caluacleted keyfigures using the CKF1: key figure 0TOTSTCK (total Quantity) and CKF2: price( Variable amount+fixed amount)/Lot size). CKF3: 0TOT