Search found 298 matches

by New Pagodi
Thu Jul 18, 2019 5:12 am
Forum: C++ Development
Topic: Is it possible to have checkboxes appear for only certain nodes in wxTreeListCtrl?
Replies: 1
Views: 14

Re: Is it possible to have checkboxes appear for only certain nodes in wxTreeListCtrl?

No. If you don't need columns, you can a regular tree control and use the state image to emulate checkboxes. I wrote an example of doing that here.
by New Pagodi
Mon Jun 24, 2019 4:07 pm
Forum: C++ Development
Topic: Transparency PNG
Replies: 5
Views: 144

Re: Transparency PNG

New Pagodi, So it is best to modify the PNG and give it an appropriate background colour in order to make it cross-platform? Thank you. That will work if the background color of the panel never changes. The only solution that is guaranteed to work on all ports is to skip the button class altogether...
by New Pagodi
Sat Jun 22, 2019 4:15 am
Forum: C++ Development
Topic: Transparency PNG
Replies: 5
Views: 144

Re: Transparency PNG

When the "transparent" parts of an image are drawn, what really happens is that the background color of the window is drawn instead. ball thinks its background color is white so that's what gets drawn for the transparent parts of the image. You can try ball->SetBackgroundColour(wxColor(0,0,0)); to m...
by New Pagodi
Sat Jun 22, 2019 2:19 am
Forum: C++ Development
Topic: closing frame
Replies: 1
Views: 63

Re: closing frame

I'm pretty sure your program is crashing. According to the documentation for connect , you need to supply a data object and an event handler or NULL will be used by default. So Connect(ID_CNR,wxEVT_COMMAND_BUTTON_CLICKED,wxCommandEventHandler(MyFrame::OnChoice1),NULL,this); and Connect(ID_CREATE,wxE...
by New Pagodi
Fri Jun 21, 2019 4:46 am
Forum: C++ Development
Topic: wxSlider custom
Replies: 2
Views: 89

Re: wxSlider custom

This should get you started: // For compilers that support precompilation, includes "wx/wx.h". #include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop #endif // for all others, include the necessary headers (this file is usually all you // need because it includes almost all "standard" wxWidgets ...
by New Pagodi
Thu Jun 06, 2019 3:11 pm
Forum: C++ Development
Topic: Button is focused when I run application
Replies: 9
Views: 200

Re: Button is focused when I run application

The only thing I can think of that should work on all platforms won't break the tab order is to add an extra hidden item and initially set the focus to it. For example, a frame with 4 buttons constructor might look like this: wxPanel* panel = new wxPanel(this); panel->Hide(); wxButton* button1 = new...
by New Pagodi
Mon Jun 03, 2019 5:15 am
Forum: C++ Development
Topic: Drawing transparent bitmap on panel
Replies: 8
Views: 6503

Re: Drawing transparent bitmap on panel

That's pretty much the classical job for a mask . With wxWidgets, you create a mask like this (assuming m_bmp is a wxBitmap member of the MyFrame class): MyFrame::MyFrame(...):wxFrame(...) { ... ::wxInitAllImageHandlers(); Bind(wxEVT_PAINT,&MyFrame::OnPaint,this); m_bmp = wxBitmap("test_sample.png",...
by New Pagodi
Thu May 23, 2019 7:42 pm
Forum: C++ Development
Topic: Static drawing on wxPanel(?)
Replies: 5
Views: 137

Re: Static drawing on wxPanel(?)

Try something like this: // For compilers that support precompilation, includes "wx/wx.h". #include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop #endif // for all others, include the necessary headers (this file is usually all you // need because it includes almost all "standard" wxWidgets head...
by New Pagodi
Thu May 23, 2019 2:05 pm
Forum: Compiler / Linking / IDE Related
Topic: Ubuntu can't link wxStyledTextCtrl
Replies: 15
Views: 352

Re: Ubuntu can't link wxStyledTextCtrl

When linking statically, you also need to include the scintilla library (wxscintilla-3.0-x86_64-w64-mingw32.a based on the picture you posted above).
by New Pagodi
Wed May 22, 2019 3:04 pm
Forum: C++ Development
Topic: wxTextCtrl: Switching on the fly from wrap to hscroll
Replies: 12
Views: 317

Re: wxTextCtrl: Switching on the fly from wrap to hscroll

rocrail wrote:
Wed May 22, 2019 2:33 pm
Since which wxWidgets Version is this control available? 3.0?
I'm not sure when it was added, but I was recently looking at commits from 2004, so it's been in for a long time.
by New Pagodi
Wed May 22, 2019 3:03 pm
Forum: C++ Development
Topic: wxTextCtrl: Switching on the fly from wrap to hscroll
Replies: 12
Views: 317

Re: wxTextCtrl: Switching on the fly from wrap to hscroll

You need to change

Code: Select all

`wx-config --libs std,aui`
to

Code: Select all

`wx-config --libs std,aui,stc`
by New Pagodi
Tue May 21, 2019 3:31 pm
Forum: C++ Development
Topic: wxTextCtrl: Switching on the fly from wrap to hscroll
Replies: 12
Views: 317

Re: wxTextCtrl: Switching on the fly from wrap to hscroll

Hi, OK, but what purpose has the SetWindowStyleFlag function if it has more or less no effect? In fairness, the documentation does state: Please note that some styles cannot be changed after the window creation and that Refresh() might need to be called after changing the others for the change to t...
by New Pagodi
Mon May 13, 2019 11:40 am
Forum: C++ Development
Topic: GetCaret()->Hide() makes the app crash at start-up
Replies: 3
Views: 111

Re: GetCaret()->Hide() makes the app crash at start-up

If you want to hide the caret in a styled text control, you should probably call

Code: Select all

SetCaretStyle(wxSTC_CARETSTYLE_INVISIBLE)
on the stc object.