Search found 167 matches

by bigpilot
Tue Jul 07, 2020 2:12 pm
Forum: Open Discussion
Topic: Suggesting a feature
Replies: 5
Views: 471

Re: Suggesting a feature

I can't use wxTextCtrl with the wxTE_RICH2 flag since it isn't supported on the other platforms. I need the solution to work on all platforms.

I'll try entering a wxTrac issue. Otherwise I'll have no choice but to modify RichTextCtrl myself.
by bigpilot
Tue Jul 07, 2020 7:03 am
Forum: Open Discussion
Topic: Suggesting a feature
Replies: 5
Views: 471

Suggesting a feature

I would like to ask the wxWidgets developers to develop a single-line rich text edit control. Any idea what the best to go about this?
by bigpilot
Mon Jul 06, 2020 6:05 pm
Forum: General Development
Topic: XRC control client position is always (0,0)
Replies: 5
Views: 209

Re: XRC control client position is always (0,0)

Hi, (I've no idea about the wxPython/AttachUnknownControl aspects of this question.) P.S.: why doesn't XRC have support for RichText controls? Doesn't it? The wx3.0.5 source contains src/xrc/xh_richtext.cpp. In fact, so does wx2.8.12. Regards, David Thanks David. I created an issue with the wxFormB...
by bigpilot
Mon Jul 06, 2020 6:02 pm
Forum: General Development
Topic: XRC control client position is always (0,0)
Replies: 5
Views: 209

Re: XRC control client position is always (0,0)

Now the question seems to be: how do I get the client position of my control relative to the parent of the <name>_container wxPanel? To answer my own question: controlA = control I want the client coordinates of relative to WindowB pos = controlA.GetScreenPosition() clientPos = WindowB.ScreenToClie...
by bigpilot
Mon Jul 06, 2020 5:29 pm
Forum: General Development
Topic: XRC control client position is always (0,0)
Replies: 5
Views: 209

Re: XRC control client position is always (0,0)

I'm starting to understand the problem. When the XRC system sees an object of type "unknown" with name <name> it creates a panel with the name <name>_container and puts that in as a sort of placeholder. When you call AttachUnknownControl() your control is actually added to the <name>_container wxPan...
by bigpilot
Mon Jul 06, 2020 4:26 pm
Forum: General Development
Topic: XRC control client position is always (0,0)
Replies: 5
Views: 209

Re: XRC control client position is always (0,0)

Looking at the implementation of AttachUnknownControl (src\xrc\xmlres.cpp): bool wxXmlResource::AttachUnknownControl(const wxString& name, wxWindow *control, wxWindow *parent) { if (parent == NULL) parent = control->GetParent(); wxWindow *container = parent->FindWindow(name + wxT("_container")); if ...
by bigpilot
Mon Jul 06, 2020 7:46 am
Forum: General Development
Topic: XRC control client position is always (0,0)
Replies: 5
Views: 209

XRC control client position is always (0,0)

I'm using wxPython to develop a form which has been constructed using XRC. On this form there are a couple of RichTextControls which are attached using AttachUnknownControl(). The form displays correctly, but when I attempt to retrieve the (client) position of the RichtText controls I always get bac...
by bigpilot
Mon Nov 21, 2016 3:40 pm
Forum: C++ Development
Topic: wxThread
Replies: 12
Views: 1341

Re: wxThread

The best way to deal with UI and threading is to use custom messages.

I'd open the progress dialog in the UI thread and then start a worker thread. Use the custom messages to signal progress (you can send anything back to the UI thread) to the dialog in the UI thread.
by bigpilot
Mon Nov 21, 2016 7:46 am
Forum: C++ Development
Topic: Size specified in XRC file not being honored
Replies: 1
Views: 538

Size specified in XRC file not being honored

I just switched from 2.8 to 3.0 and I noticed that the size I specify in the XRC file is being ignored. I can only get the proper size by programmatically setting it in code.

Anyone know why this was changed?
by bigpilot
Wed Nov 20, 2013 10:26 am
Forum: C++ Development
Topic: XP Theme frame border issues
Replies: 2
Views: 1093

Re: XP Theme frame border issues

I think I solved it. I had the border style set to DOUBLE_BORDER and have now changed it to NO_BORDER.
by bigpilot
Wed Nov 20, 2013 9:46 am
Forum: C++ Development
Topic: XP Theme frame border issues
Replies: 2
Views: 1093

XP Theme frame border issues

I'm developing an application which looks fine in Windows Classic theme under Windows XP but when I switch to Windows XP Theme the border of the frame begets painting issues. It looks like the border is not properly repainted. I mitigated it somewhat with adding wxWindow::ClearBackground() in the Pa...
by bigpilot
Sat Jul 23, 2011 3:16 pm
Forum: C++ Development
Topic: Transparency of XPM and wxTaskBarIcon
Replies: 3
Views: 1298

Re: Transparency of XPM and wxTaskBarIcon

That should work. I'm using more or less the same code and it works: wxBitmap icon( ProgIcon_xpm ); wxMask* pMask = new wxMask( icon, wxColor( 0, 0, 0 ) ); icon.SetMask( pMask ); wxIcon program_icon; program_icon.CopyFromBitmap( icon ); SetIcon( program_icon ); But note that your bitmap needs to be ...
by bigpilot
Wed Jul 20, 2011 7:25 pm
Forum: C++ Development
Topic: Problem with wxArrayString::Index()
Replies: 5
Views: 1634

Re: Problem with wxArrayString::Index()

You were right. I made an error when receiving from DDE. My code was: bool MainFrame::OnPoke(const wxString& topic, const wxString& item, wxChar* data, int size, wxIPCFormat format) { wxLogDebug( wxT("MainFrame::OnPoke() %d"), wxGetProcessId() ); if ( topic == wxT("ARGS") ) { if ( item == wxT("ARGV"...
by bigpilot
Wed Jul 20, 2011 6:55 pm
Forum: C++ Development
Topic: Problem with wxArrayString::Index()
Replies: 5
Views: 1634

Re: Problem with wxArrayString::Find

It now reports that the size s1 is 31 bytes and the size of s2 is 64 bytes, even though they are identical. And which would be the correct size? I'm using a Unicode build of 2.8.12. I'm receiving the file paths through DDE from another instance of the program. It looks like it's storing one string ...
by bigpilot
Wed Jul 20, 2011 6:54 pm
Forum: C++ Development
Topic: Problem with wxArrayString::Index()
Replies: 5
Views: 1634

Re: Problem with wxArrayString::Index()

The length of 31 is correct. I'm wondeing about this code: #define STRING(p) ((wxString *)(&(p))) In combination with for( size_t ui = 0; ui < m_nCount; ui++ ) { if( STRING(m_pItems[ui])->IsSameAs(sz, bCase) ) return ui; And with the knowledge that m_pItems is of type wxChar**. The STRING macro take...