Author Topic: SOLVED: GUI Problem - Can't Seem to Get It  (Read 6024 times)

Offline arew264

  • Multiple posting newcomer
  • *
  • Posts: 22
SOLVED: GUI Problem - Can't Seem to Get It
« on: July 10, 2007, 04:09:13 am »
Okay, so this is somewhat CodeBlocks related and somewhat GUI dev related, so here goes:
I've been trying to get a GUI designed in wxWidgets for a basic telnet chat client. I need two text boxes, one for a list of people in the chat room and one for the chat messages.
The trouble is that I've been using wxFormBuilder to try to make a GUI, and I don't see a widget that would give me a text box for the messages.
I can use a list box for the users in the chat room, but what can I use for the chat messages?
Anyone have something better than wxFormBuilder for this type of setup?
I'm on the verge of just installing VC++ for this as I've spent the last week wading through documentation for GTK and then wxWidgets.
« Last Edit: July 11, 2007, 11:42:08 pm by arew264 »

Offline klight

  • Multiple posting newcomer
  • *
  • Posts: 24
Re: GUI Problem - Can't Seem to Get It
« Reply #1 on: July 10, 2007, 04:45:40 am »
You probably want a wxTextCtrl with a style set with wxTE_MULTILINE enabled.  You can also enable the wxTE_READONLY style.  IIRC wxTextCtrl does have a limit to the amount of data which can be appended/inserted, after which no new data can be appended until older data is removed.

I don't think that the tool, wxFormBuilder or wxSmith, will have any impact on you implementation as either will construct one or more dialogs with all of the widgets you would need.

Offline manmach

  • Multiple posting newcomer
  • *
  • Posts: 39
Re: GUI Problem - Can't Seem to Get It
« Reply #2 on: July 10, 2007, 08:24:14 am »
The textbox widget is the fourth from the left under common, in wxFormbuilder.
You might recognise it by the icon of a textbox.

And the label wxTextCtrl if you hover your mouse over it.

Offline arew264

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: GUI Problem - Can't Seem to Get It
« Reply #3 on: July 11, 2007, 10:25:37 pm »
Okay, so I did do that, and it worked, but I for whatever reason decided to try it in wxSmith, so it's all set up there.
The problem now is getting wxSmith to generate the happy callback functions. I enabled the option that sends a signal when the user presses enter in the input TextCtrl, so I should at least get something for that.
How do I get wxSmith to generate code, or if it doesn't, is there documentation for this sort of thing that I can look at somewhere?

Offline arew264

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: GUI Problem - Can't Seem to Get It
« Reply #4 on: July 11, 2007, 11:41:51 pm »
I still can't seem to realize that documentation is in the wiki. This is an ongoing problem for me. I'll have a problem, search for documentation, find none, ask about it, and then suddenly see a button labeled 'wiki'.
Needless to say, I found the tutorial and it all makes a lot more sense now. Thanks to all who helped me before.

Offline arew264

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: SOLVED: GUI Problem - Can't Seem to Get It
« Reply #5 on: July 12, 2007, 12:10:00 am »
AUGH, the fun proves to be never ending.
Something seems to be wrong with my build, but I don't see how.
Trying to compile my project yields this:
Code
-------------- Build: Debug in ChatClient ---------------
Compiling: ChatClientMain.cpp
In file included from C:/wxWidgets-2.8.4/include/wx/defs.h:21,
                 from C:/wxWidgets-2.8.4/include/wx/dialog.h:15,
                 from C:\Documents and Settings\Andrew\Desktop\ChatClient\/ChatClientMain.h:14,
                 from C:\Documents and Settings\Andrew\Desktop\ChatClient\ChatClientMain.cpp:10:
C:/wxWidgets-2.8.4/include/wx/platform.h:196:22: wx/setup.h: No such file or directory
In file included from C:/wxWidgets-2.8.4/include/wx/platform.h:279,
                 from C:/wxWidgets-2.8.4/include/wx/defs.h:21,
                 from C:/wxWidgets-2.8.4/include/wx/dialog.h:15,
                 from C:\Documents and Settings\Andrew\Desktop\ChatClient\/ChatClientMain.h:14,
                 from C:\Documents and Settings\Andrew\Desktop\ChatClient\ChatClientMain.cpp:10:
C:/wxWidgets-2.8.4/include/wx/chkconf.h:98:9: #error "wxUSE_DYNLIB_CLASS must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:106:9: #error "wxUSE_EXCEPTIONS must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:114:9: #error "wxUSE_FILESYSTEM must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:122:9: #error "wxUSE_FS_ARCHIVE must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:135:9: #error "wxUSE_DYNAMIC_LOADER must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:143:9: #error "wxUSE_LOG must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:151:9: #error "wxUSE_LONGLONG must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:159:9: #error "wxUSE_MIMETYPE must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:175:9: #error "wxUSE_PRINTF_POS_PARAMS must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:183:9: #error "wxUSE_PROTOCOL must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:225:9: #error "wxUSE_REGEX must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:233:9: #error "wxUSE_STDPATHS must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:241:9: #error "wxUSE_XML must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:249:9: #error "wxUSE_SOCKETS must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:257:9: #error "wxUSE_STREAMS must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:265:9: #error "wxUSE_STOPWATCH must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:273:9: #error "wxUSE_TEXTBUFFER must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:281:9: #error "wxUSE_TEXTFILE must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:297:9: #error "wxUSE_URL must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:305:9: #error "wxUSE_VARIANT must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:325:9: #error "wxUSE_ABOUTDLG must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:333:9: #error "wxUSE_ACCEL must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:341:9: #error "wxUSE_ANIMATIONCTRL must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:349:9: #error "wxUSE_BITMAPCOMBOBOX must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:357:9: #error "wxUSE_BMPBUTTON must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:365:9: #error "wxUSE_BUTTON must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:373:9: #error "wxUSE_CALENDARCTRL must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:381:9: #error "wxUSE_CARET must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:389:9: #error "wxUSE_CHECKBOX must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:405:9: #error "wxUSE_CHOICE must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:413:9: #error "wxUSE_CHOICEBOOK must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:421:9: #error "wxUSE_CHOICEDLG must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:429:9: #error "wxUSE_CLIPBOARD must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:437:9: #error "wxUSE_COLLPANE must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:445:9: #error "wxUSE_COLOURDLG must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:453:9: #error "wxUSE_COLOURPICKERCTRL must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:461:9: #error "wxUSE_COMBOBOX must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:469:9: #error "wxUSE_COMBOCTRL must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:477:9: #error "wxUSE_DATAOBJ must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:485:9: #error "wxUSE_DATAVIEWCTRL must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:493:9: #error "wxUSE_DATEPICKCTRL must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:501:9: #error "wxUSE_DIRPICKERCTRL must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:509:9: #error "wxUSE_DISPLAY must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:517:9: #error "wxUSE_DOC_VIEW_ARCHITECTURE must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:525:9: #error "wxUSE_FILEDLG must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:533:9: #error "wxUSE_FILEPICKERCTRL must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:541:9: #error "wxUSE_FONTDLG must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:549:9: #error "wxUSE_FONTMAP must be defined."
C:/wxWidgets-2.8.4/include/wx/chkconf.h:557:9: #error "wxUSE_FONTPICKERCTRL must be defined."
Process terminated with status 1 (0 minutes, 10 seconds)
50 errors, 0 warnings

Was there some sort of configure command that I was supposed to run or something?

Offline arew264

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: SOLVED: GUI Problem - Can't Seem to Get It
« Reply #6 on: July 12, 2007, 12:16:22 am »
Well, a quick google and the wxWidgets wiki solved that one. Guess I should just let this thread die now.