Search found 40 matches

by Edgar
Thu Mar 01, 2012 6:12 am
Forum: General Development
Topic: wxTextCtrl How do I set the Selection[Back/Fore]groundColour
Replies: 2
Views: 1522

Re: wxTextCtrl How do I set the Selection[Back/Fore]groundCo

Thanks, again! I would never have looked for SetSelBackground--I hate it when things are abbreviated like that <grin>!
by Edgar
Wed Feb 29, 2012 10:30 pm
Forum: General Development
Topic: wxTextCtrl How do I set the Selection[Back/Fore]groundColour
Replies: 2
Views: 1522

wxTextCtrl How do I set the Selection[Back/Fore]groundColour

When user drag selects some text the foreground pen changes to a light color and the background pen to a dark blue. How do I set these? This will not compile: wxColour selectionBackgroundColor(0, 200, 0) m_wxTextCtrl->SetSelectionBackgroundColour(selectionBackgroundColor); because SetSelectionBackgr...
by Edgar
Wed Feb 29, 2012 10:09 pm
Forum: C++ Development
Topic: wxPanel ForegroundColour what is it used for?
Replies: 2
Views: 1536

Re: wxPanel ForegroundColour what is it used for?

doublemax wrote:That's true, but if you first set this color and then add children to the panel, these controls should inherit the color settings.
I see, thanks!
by Edgar
Wed Feb 29, 2012 8:14 pm
Forum: C++ Development
Topic: wxPanel ForegroundColour what is it used for?
Replies: 2
Views: 1536

wxPanel ForegroundColour what is it used for?

I'm working on a generalized preference utility.
I can see what wxStaticText::ForegroundColour and wxButton::ForegroundColour do but it seems to be nop for wxPanel.
by Edgar
Mon Jan 23, 2012 11:58 pm
Forum: C++ Development
Topic: storing font in config file
Replies: 8
Views: 2016

Re: storing font in config file

Worked a charm, thanks! reduction of about 30 lines of code.
by Edgar
Mon Jan 23, 2012 9:44 pm
Forum: C++ Development
Topic: storing font in config file
Replies: 8
Views: 2016

Re: storing font in config file

doublemax wrote:I think you can simplify it a little bit more by using wxColour::GetAsString().
The wxColour ctor that takes a wxString as parameter understands the format, so you can use it directly.
Good suggestion, will give it a go, thanks!
by Edgar
Mon Jan 23, 2012 7:10 pm
Forum: C++ Development
Topic: storing font in config file
Replies: 8
Views: 2016

Re: storing font in config file

Here is what I came up with... storing the data: void GUIPrefs::OnFontDialogButton(wxCommandEvent & e) { wxFontDialog fontDialog = new wxFontDialog((wxWindow *)this); fontDialog.ShowModal(); wxFontData fontData = fontDialog.GetFontData(); gPrefs->Write(wxT("/GUI/NativeFontForNameInWaveform"), fontDa...
by Edgar
Mon Jan 23, 2012 5:11 pm
Forum: C++ Development
Topic: storing font in config file
Replies: 8
Views: 2016

Re: storing font in config file

Use wxFont::GetNativeFontInfoDesc() / wxFont::SetNativeFontInfo() http://docs.wxwidgets.org/stable/wx_wxfont.html#wxfontgetnativefontinfodesc http://docs.wxwidgets.org/stable/wx_wxfont.html#wxfontsetnativefontinfo This was what I needed I think--will need to test this out and report back later. Tha...
by Edgar
Mon Jan 23, 2012 5:10 pm
Forum: C++ Development
Topic: storing font in config file
Replies: 8
Views: 2016

Re: storing font in config file

Muetdhiver wrote: Please can you tell what is your real problem with wxConfigBase class ?
No problem with the class, see next reply...
by Edgar
Mon Jan 23, 2012 6:48 am
Forum: C++ Development
Topic: storing font in config file
Replies: 8
Views: 2016

storing font in config file

in TheApp.h: class TheApp:public wxApp { public: [...] wxFont mWaveformFont; wxColor mWaveformFontColor; [...] }; In the Prefs panel a wxFontDialog returns a wxFontData from which a wxFont and wxColour are Get...()ed and stored in the App: void GUIPrefs::OnFontDialogButton(wxCommandEvent & e) { wxFo...
by Edgar
Thu Mar 10, 2011 3:52 pm
Forum: C++ Development
Topic: file system change notification
Replies: 4
Views: 1221

catalin wrote:Since 2.9.1 there is wxFileSystemWatcher
Great! I think my online documentation link is out-of-date.

Thanks!
by Edgar
Thu Mar 10, 2011 4:42 am
Forum: C++ Development
Topic: file system change notification
Replies: 4
Views: 1221

file system change notification

Audacity wants to be notified when an audio file the user has imported has been changed/deleted/unmounted. Is there already something in wxWidgets which will give cross-platform file change notifications?
by Edgar
Sun Jan 31, 2010 6:27 pm
Forum: C++ Development
Topic: wxTextCtrl and scrollbars
Replies: 2
Views: 724

Auria wrote:Are you using sizers? From the code you posted, it seems not. It is highly recommended to use sizers, as they will take care of such issues
Will go back and play with Sizers--thanks!
by Edgar
Sun Jan 31, 2010 12:50 am
Forum: C++ Development
Topic: wxTextCtrl and scrollbars
Replies: 2
Views: 724

wxTextCtrl and scrollbars

This is related to Audacity's open source code. I am having a little bit of trouble figuring out how to get this text control to behave. Here is some of the code: class SuccessDialog : public wxDialog { public: SuccessDialog(wxWindow *parent, wxWindowID id, const wxString &title, const wxSize &size ...
by Edgar
Sun Nov 08, 2009 8:10 pm
Forum: General Development
Topic: Proposal: GUI enhancement to wxSlider
Replies: 2
Views: 872

Here is the image to go with the discussion on the dev-list describing various slider implementations on Windows applications:

Image[/img]