Search found 54 matches

by Sunsawe
Thu Aug 20, 2009 7:05 pm
Forum: C++ Development
Topic: Why does SetFont destroy the sizer's layout??
Replies: 6
Views: 1071

thank you!
that was the problem.
by Sunsawe
Wed Aug 05, 2009 2:35 pm
Forum: C++ Development
Topic: Why does SetFont destroy the sizer's layout??
Replies: 6
Views: 1071

Well, actually, that's what I do.

If you look at the brackets, you'll notice that the setFont is done inside the sizer->Add() call and so, on the object returned by (new wxStaticText(...)).
by Sunsawe
Wed Aug 05, 2009 1:03 pm
Forum: C++ Development
Topic: Why does SetFont destroy the sizer's layout??
Replies: 6
Views: 1071

Why does SetFont destroy the sizer's layout??

Hi, I really do not understand what's happening there. I have a piece of code which is working fine: fgs = new wxFlexGridSizer(0,2,1,1); fgs->AddGrowableCol(1); fgs->Add( (new wxStaticText(page,wxID_ANY,wxT("Name :"))) //->SetFont(wxFont(16,wxFONTFAMILY_DEFAULT,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_BOLD))...
by Sunsawe
Sun Aug 02, 2009 8:18 pm
Forum: C++ Development
Topic: How to clean, populate and refresh a wxPanel?
Replies: 4
Views: 1091

Actually, I don't want to destroy and recreate the panel because it can come from different places and already a part of a complex module. It seems simpler to just clean it than to find out where it is coming from and in which sizers it is already included then replace the new panel in that place. B...
by Sunsawe
Sun Aug 02, 2009 8:19 am
Forum: C++ Development
Topic: How to clean, populate and refresh a wxPanel?
Replies: 4
Views: 1091

I am sorry but how do you hide the children of a wxWindow?

I try to hide the complete panel before modifying it and re-show it afterwards. It did not change anything.
by Sunsawe
Sat Aug 01, 2009 10:49 pm
Forum: C++ Development
Topic: How to clean, populate and refresh a wxPanel?
Replies: 4
Views: 1091

How to clean, populate and refresh a wxPanel?

Hi, So as the title says, I would like to clean a wxPanel; meaning, erasing every child it may have. Then I would like to assign it a new sizer with and new "children". Finally I would like to update the view. This is the code I use: //page is the panel page->DestroyChildren(); fgs = new wxFlexGridS...
by Sunsawe
Sat Aug 01, 2009 10:18 pm
Forum: C++ Development
Topic: How to use the wxFlexGridSizer?
Replies: 2
Views: 570

wow, I have to admit that I obviously did not understand anything to "how to use the wxFlexGridSizer".
I had to check other post talking about these growable rows to understand the way they work.

Eventually, I found out.

Thanks for you hint.
by Sunsawe
Sat Aug 01, 2009 9:19 am
Forum: C++ Development
Topic: How to use the wxFlexGridSizer?
Replies: 2
Views: 570

How to use the wxFlexGridSizer?

Hi, I would like to achieve something I think being pretty simple. On a panel, I have a wxTreeCtrl on its right a simple panel and under it a button. The idea is that the button should always be minimal and the rest of the space should be split in between the treectrl and the panel as 3/4 for the fi...
by Sunsawe
Wed Jul 11, 2007 6:06 am
Forum: wxDev-C++
Topic: wxStringTokenizer, can't get it work properly
Replies: 5
Views: 1164

it means that i would have to:
-Tokenize the text in lines
-Detect empty lines
-Rebuild each part according to these lines
....

No way to have a complete string as a separator?

Maybe a substring cutting thing manually done would be better no?
by Sunsawe
Tue Jul 10, 2007 10:38 pm
Forum: wxDev-C++
Topic: wxStringTokenizer, can't get it work properly
Replies: 5
Views: 1164

wxStringTokenizer, can't get it work properly

Hi all, I'm using that code to split a text in part with empty line as separator wxStringTokenizer tkz(text, wxT("\r\n\r\n")); while ( tkz.HasMoreTokens() ) { wxString token = tkz.GetNextToken(); // process token here } But with that, it splits the text at each line ( so like if "\r\n" was the separ...
by Sunsawe
Wed Jun 06, 2007 10:43 pm
Forum: Compiler / Linking / IDE Related
Topic: winsock.h or winsock2.h can i choose?
Replies: 10
Views: 2231

i found on the net.
Including wx/msw/winundef.h right after winsock2.h solved the problem.
by Sunsawe
Tue Jun 05, 2007 4:38 pm
Forum: Compiler / Linking / IDE Related
Topic: winsock.h or winsock2.h can i choose?
Replies: 10
Views: 2231

well....
i'm not linking explicitely with anything. i'm using the automatic linking (don't know exactly how it works but it does...)

Why including winsock2.h is creating those errors? Something is missing in the linking thing obviously but which part of wxWidgets?

:cry:
by Sunsawe
Tue Jun 05, 2007 11:09 am
Forum: Compiler / Linking / IDE Related
Topic: winsock.h or winsock2.h can i choose?
Replies: 10
Views: 2231

my classes are inheriting from wxApp and wxFrame.
by Sunsawe
Tue Jun 05, 2007 6:17 am
Forum: Compiler / Linking / IDE Related
Topic: winsock.h or winsock2.h can i choose?
Replies: 10
Views: 2231

Actually... i have never used that before... But i tried, i had DECLARE_CLASS(class); in the two classes (.h file) deriving from a wxWidgets class and IMPLEMENT_CLASS(classname, baseclass) in their cpp files. Then it does.... nothing! Still have exactly the same errors. I also tried with DECLARE_DYN...
by Sunsawe
Mon Jun 04, 2007 10:28 pm
Forum: Compiler / Linking / IDE Related
Topic: winsock.h or winsock2.h can i choose?
Replies: 10
Views: 2231

well i tried but... If the part of the project that i was looking for can compil, the main project gives: hello.obj : error LNK2001: unresolved external symbol "public: virtual class wxClassInfo * __thiscall wxEvtHandler::GetClassInfoW(void)const " ([email protected]@@[email protected]@XZ...