Search found 34 matches

by hou
Tue Jul 29, 2008 5:50 am
Forum: C++ Development
Topic: How to get the row index when click a row(wxGridSelectRows)
Replies: 1
Views: 547

wxGridEvent has that function. Got it ->GetRow I learn. haha :)
by hou
Tue Jul 29, 2008 3:06 am
Forum: C++ Development
Topic: How to get the row index when click a row(wxGridSelectRows)
Replies: 1
Views: 547

How to get the row index when click a row(wxGridSelectRows)

Tks for answering:
I make a Grid named sg1, then

sg1->SetSelectionMode(wxGrid::wxGridSelectRows);
sg1->EnableEditing(false);

so when I click a cell the whole row will be selected, but how
can I get the row index that I clicked? Which function?
by hou
Wed Jul 23, 2008 5:50 am
Forum: C++ Development
Topic: wxListBox->Clear() VS "wxEVT_COMMAND_LISTBOX_SELECTE
Replies: 1
Views: 1017

I find the clear() will call EVT_LISTBOX, when there is a item is selected, so I use Deselect(listbox->GetSelection()), to deselect the item. so it works fine. Does that solution ok?

Any suggestion?
by hou
Tue Jul 22, 2008 2:14 pm
Forum: C++ Development
Topic: wxListBox->Clear() VS "wxEVT_COMMAND_LISTBOX_SELECTE
Replies: 1
Views: 1017

wxListBox->Clear() VS "wxEVT_COMMAND_LISTBOX_SELECTE

Tks for answering! 1. I use wxListBox->clear() in function A; it works fine; 2, when I click the item in listbox, I called function EVT_LISTBOX, .. it works fine; 3. When I call function A, wxListbox->clear(), it jump directly to the function EVT_LISTBOX...... why the clear() jump to the itemclick f...
by hou
Tue Jul 22, 2008 2:12 pm
Forum: C++ Development
Topic: wxListBox->Clear, why, collapse? Memory leak?
Replies: 5
Views: 884

anyone give me some suggestion?

wait for some info. :(
by hou
Tue Jul 22, 2008 8:03 am
Forum: C++ Development
Topic: wxListBox->Clear, why, collapse? Memory leak?
Replies: 5
Views: 884

The error happend in BBBB,but debug it and run to it, then it jump out of its own function and go to the following fuction MenuItemClick, so weird. Tks :):) In function (wxChoice::Select()) wxString strMainIni = strDir + wxT("mc_conf.conf"); lst1->Clear();//BBBB //for(int i=0;i<lst1->GetCount();i++)...
by hou
Tue Jul 22, 2008 7:39 am
Forum: C++ Development
Topic: wxListBox->Clear, why, collapse? Memory leak?
Replies: 5
Views: 884

yeah, I use gdb debug, but a very weird thing happened:

when I debug in the line: lst1->Clear(),//line 200, next step, then it flies to line300, jumped out from the function and go to the next breakpoint in the next function.

what?

:)
by hou
Tue Jul 22, 2008 7:18 am
Forum: C++ Development
Topic: How to clear certain rows of a wxGrid? like 1 to 4
Replies: 2
Views: 710

hi Timg, Tks a lot!

At first I didn't got the function in the manual, but it has and works fine. Can you email me a updated manual? hehe, just joking, my email:[email protected].

Tks always.
by hou
Tue Jul 22, 2008 7:00 am
Forum: C++ Development
Topic: wxListBox->Clear, why, collapse? Memory leak?
Replies: 5
Views: 884

wxListBox->Clear, why, collapse? Memory leak?

Tks for answering... In Listbox1 item click event, I use: for() { ListBox2->Append(wxString(const char* ..,wxConvUTF8,wxSTRING_MAXLEN)) } When in another function, I use ListBox1->Clear(); Then I got error: and collapse Program received signal SIGINT, Interrupt. In __kernel_vsyscall () () Debugger f...
by hou
Tue Jul 22, 2008 3:16 am
Forum: C++ Development
Topic: How to clear certain rows of a wxGrid? like 1 to 4
Replies: 2
Views: 710

How to clear certain rows of a wxGrid? like 1 to 4

Tks for answer. How to clear certain rows of a grid. not use cleargrid() to clear the whole rows. why I want to do this, is I want to add title in the 0 row,like "name","gender"..."", I don't want to clear the 0 row title. Another question: The default title A,B,C....when use a wxGrid, can I get rid...
by hou
Tue Jul 22, 2008 2:29 am
Forum: C++ Development
Topic: Segmentation fault with wxListBox?
Replies: 6
Views: 814

confused with wxSTRING_MAXLEN?

try +1 it also fail. but try 50 it works well.

confused with wxSTRING_MAXLEN?
by hou
Mon Jul 21, 2008 2:35 pm
Forum: C++ Development
Topic: Segmentation fault with wxListBox?
Replies: 6
Views: 814

Tks mc2r, I just find the error codes are: char szValue[wxSTRING_MAXLEN]; // here is ok strcpy(szValue,strMcIni.mb_str()); //yeah, szValue get the value of strMcIni const char* pszMenuFile = szValue; //ok CSimpleIniA iniMenu(true,true,true);//after this line, error happens, the pszMenuFile's segment...
by hou
Mon Jul 21, 2008 5:47 am
Forum: C++ Development
Topic: Segmentation fault with wxListBox?
Replies: 6
Views: 814

no relevant with wxListBox

I find the error happened in the strcpy, so I will check what
is the wrong with it. Anyone know the reason?
by hou
Mon Jul 21, 2008 4:34 am
Forum: C++ Development
Topic: Segmentation fault with wxListBox?
Replies: 6
Views: 814

Segmentation fault with wxListBox?

for(int i=1;i<nCount;i++) { wxString strTmp2 = wxString::Format(wxT("%d"),i); wxString strMcIni = strDir + wxT("mc_m") + strTmp2 + wxT(".conf"); //char szValue[wxSTRING_MAXLEN]; //strcpy(szValue,); //const char* pszMenuFile = szValue; CSimpleIniA iniMenu(true,true,true);// a use of ini SI_Error rc =...
by hou
Thu Jul 17, 2008 6:29 am
Forum: C++ Development
Topic: wxString convert to char*, so weird!
Replies: 2
Views: 1096

wxString convert to char*, so weird!

I want to change a wxString to char*, then I can use: wxString strTemp; const char* pz = strTemp.c_str(); const char* pz = strTemp.char_str(); const char* pz = strTemp.mb_str(); const char* pz = strTemp.ToAsicc(); ... but I find aboving methods all return a "\0\0....somechar..." under CodeBlocks(my ...