Results 1 to 2 of 2
  1. #1
    Java.child is offline Member
    Join Date
    Sep 2008
    Posts
    32
    Rep Power
    0

    Default How to Change the color of MultiColumnListBox

    Hello Experts,

    I am facing one problem.I want after the code fetches data from DB(MS-SQL),it will changes the color of the row in a particular condition.






    public MultiColumnListBox ListCRVM = new MultiColumnListBox();
    public Data dataListCRVM = new Data();

    ListCRVM.setName( "ListCRVM" );
    ListCRVM.clear();
    add( ListCRVM );
    ListCRVM.setVisible( true );
    ListCRVM.setEnabled( true );
    ListCRVM.setRequestFocusEnabled( true );
    ListCRVM.setTabOrder( 0 );
    ListCRVM.setRowSource( dataListCRVM );
    ListCRVM.setColumnCount( 10 );
    ListCRVM.setColumnHeaderVisible( true );
    ListCRVM.setColumnWidths( "1550;1000;440;400;2592;432;5098;1728;0;5040;1 728" );
    ListCRVM.setBoundColumn( 0 );
    ListCRVM.setShowGrid(true);
    ListCRVM.setForeground( Color.black );
    ListCRVM.setLocation( 40, 168 );
    ListCRVM.setSize( 1108, 228 );
    ListCRVM.setFont( new Font("SansSerif", Font.PLAIN, 11) );





    if( List.equalsIgnoreCase( "ALL" ) )
    {
    OptAlert.setEnabled( true );
    dataListCRVM.setRecordSource( "SELECT [CRVMReq].[ReqId], [CRVMReq].[ClientReq],[CRVMReq].[ResumeSample] as RS,[CRVMReq].[Priority], [CRVMReq].[Subject],[CRVMReq].[ByPass], [CRVMReq].[ConsultantNames] as [ConsultantNamesAll],[CRVMReq].[Rec1],[CRVMReq].[Rec2], [CRVMReq].[Note] FROM CRVMReq where [FlashCounter]<" + GetActiveRec + " AND ReqStatusPool NOT like 'FOCUS' and ReqStatus like 'OPEN' and ReadyTD='YES' order by Date desc;" );

    Data.initControls(dataListCRVM);
    ListCRVM.setRowSource(dataListCRVM);
    ListCRVM.setVisible(false);
    ListCRVM.setVisible(true);

    }

    Please suggest me if there is any way to do so?
    Thanks

  2. #2
    Steve11235's Avatar
    Steve11235 is offline Senior Member
    Join Date
    Dec 2008
    Posts
    1,046
    Rep Power
    7

    Default

    MultiColumnListBox is not, as far as I can tell, a standard class. That means it must be custom developed and made available to you, perhaps through a JAR file. That also means that we don't know how it works...

Similar Threads

  1. Replies: 6
    Last Post: 05-14-2011, 06:48 AM
  2. Change the color in my program
    By carl in forum New To Java
    Replies: 5
    Last Post: 04-03-2009, 12:20 PM
  3. How to change string Color
    By Java.child in forum AWT / Swing
    Replies: 3
    Last Post: 01-06-2009, 04:27 AM
  4. How to change backgrnd color of link(active)
    By Captainz in forum New To Java
    Replies: 1
    Last Post: 05-02-2008, 11:10 PM
  5. How to change TXT color Onclick
    By dave700800 in forum New To Java
    Replies: 1
    Last Post: 12-08-2007, 01:39 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •