LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-16-2003, 02:09 PM   #1
Fe98
Member
 
Registered: Sep 2003
Distribution: RH9
Posts: 49

Rep: Reputation: 15
Some wxWindows help needed please


I'm trying to insert some stuff into a ListCtrl but I'm having no luck whatsoever.
Could someone please point out what errors I have in the following code.
Thanks.

Code:
void MainWindow::OnFileOpen (wxCommandEvent &event)
{
    DisplayCode dialog (this, -1, "Code Listing");
    
    wxListCtrl *codeListing = (wxListCtrl*)FindWindow (ID_LISTCTRL);
    
    codeListing->InsertColumn (0, "Line", wxLIST_FORMAT_LEFT, 100);
    codeListing->InsertColumn (1, "Executed", wxLIST_FORMAT_LEFT, 100);
    codeListing->InsertColumn (2, "Code", wxLIST_FORMAT_LEFT, 375);
    codeListing->SetTextColour (*wxRED);
    
    int result = codeListing->InsertItem (5, "TEeeeeeee");        // DOESN'T SEEM TO WORK
    
    codeListing->SetItem (0, 0, "Test", -1);
	
    dialog.ShowModal ();
	
    wxString temp;
    //temp += wxString::Format("%d", codeListing->GetItemCount ());
    temp += wxString::Format("%d", result);
    wxMessageBox(temp, "Heading", wxOK | wxICON_INFORMATION, this);

    // I am getting an output of 5 being displayed in the message box above....this seems correct
    // .... see the codeListing-InsertItem (5......) line......but nothing is being displayed in the ListCtrl
	
}
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
WxWindows and MingW Genjix Programming 0 01-01-2005 05:35 AM
wxWindows JurajPsycho Programming 6 10-17-2004 05:01 AM
wxWindows linking karlan Programming 0 07-28-2004 11:02 PM
wxwindows information zenitem Programming 1 11-08-2003 06:07 PM
wxWindows Skute Programming 2 10-31-2003 05:09 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration