Search found 81 matches

by guzzi_jones
Sun Dec 08, 2013 3:08 pm
Forum: C++ Development
Topic: wxChoice add values from DB
Replies: 10
Views: 3039

Re: wxChoice add values from DB

And this worked to grab the values from a postgresql database: I hope this helps someone in the future. I am sure learning a lot. /// connection header file: #ifndef DBCON_H #define DBCON_H #include <pqxx/pqxx> #include <iostream> #include <string> using namespace pqxx; class dbcon { connection* C; ...
by guzzi_jones
Sun Dec 08, 2013 2:57 pm
Forum: C++ Development
Topic: wxChoice add values from DB
Replies: 10
Views: 3039

Re: wxChoice add values from DB

I did get the code to compile using the following char* data type:

Choice1 = new wxChoice(Panel1, ID_CHOICE1, wxDefaultPosition, wxDefaultSize, 0, 0, 0, wxDefaultValidator, _T("ID_CHOICE1"));
char* t1;
t1="test";

Choice1->Append( wxString(t1, wxConvLocal) );
by guzzi_jones
Sun Dec 08, 2013 2:34 pm
Forum: C++ Development
Topic: wxChoice add values from DB
Replies: 10
Views: 3039

Re: wxChoice add values from DB

thanks for the help.
I had installed it form the ubuntu software center.
Where is version 3.0?

I really appreciate all the help.
by guzzi_jones
Sun Dec 08, 2013 2:14 pm
Forum: C++ Development
Topic: wxChoice add values from DB
Replies: 10
Views: 3039

Re: wxChoice add values from DB

Thanks for the quick responses! I just tried this: Choice1 = new wxChoice(Panel1, ID_CHOICE1, wxDefaultPosition, wxDefaultSize, 0, 0, 0, wxDefaultValidator, _T("ID_CHOICE1")); string t1; t1="test"; Choice1->Append( t1 ); compiler error: /home/aj/bdn/editmasters_dialog.cpp||In constructor ‘editmaster...
by guzzi_jones
Sun Dec 08, 2013 1:52 pm
Forum: C++ Development
Topic: wxChoice add values from DB
Replies: 10
Views: 3039

Re: wxChoice add values from DB

versions: Codeblocks 10.5 wxsmith 1.0 wxsmithaui 0.8.1 wxsmithcontribitems .1 wxsmithmeme 1 code: Choice1 = new wxChoice(Panel1, ID_CHOICE1, wxDefaultPosition, wxDefaultSize, 0, 0, 0, wxDefaultValidator, _T("ID_CHOICE1")); string t1; t1="test"; Choice1->Append(wxT("t1")); // this works Choice1->Appe...
by guzzi_jones
Sun Dec 08, 2013 3:56 am
Forum: C++ Development
Topic: wxChoice add values from DB
Replies: 10
Views: 3039

wxChoice add values from DB

I am a newb with wxWidgets. I have a database setup and i would like to fill a wxChoice with values from a select statement. Choice1->Append(_("name1")) only seems to work with quotes around a hardcoded string How can i use a string variable instead of hardcoding the values? Choice1 = new wxChoice(P...