Search found 396 matches

by sethjackson
Tue Jun 13, 2006 12:57 am
Forum: C++ Development
Topic: wxNoteBookEvent.Veto() problem
Replies: 2
Views: 553

Re: wxNoteBookEvent.Veto() problem

I have a wxNotebook and I want to prevent the user from accessing certain tabs until information on the first tab has been properly filled out. I tried to just Veto the event with the changing handler whenever they clicked and their first tab info was not valid, but this prevents the user from clic...
by sethjackson
Mon Jun 12, 2006 7:24 pm
Forum: C++ Development
Topic: wxTextCtrl problem
Replies: 15
Views: 2330

Phew. :D I would accept your answer, but there is no button for it..... Perhaps because the thread has a 'Post' symbol rather than a 'Question' one. Please don't lose any sleep about it. ;) Yeah finally got it to work. :D Thanks for helping me again. :D It could be there is no accept button because...
by sethjackson
Mon Jun 12, 2006 7:10 pm
Forum: C++ Development
Topic: wxTextCtrl problem
Replies: 15
Views: 2330

Perfect thanks. It worked. :D

I would accept your answer, but there is no button for it.....
by sethjackson
Mon Jun 12, 2006 5:59 pm
Forum: C++ Development
Topic: wxTextCtrl problem
Replies: 15
Views: 2330

Um, I suppose the loss of focus from the wxLogMessage just could be to blame...? Yeah. :shock: :? Was that "It worked, I'm shocked"? :wink: If not, I wonder if the Selection is being killed by the SetInsertionPoint. Try swapping to: if (flags & wxFR_DOWN) SetInsertionPoint(endPos); SetSelection(sta...
by sethjackson
Mon Jun 12, 2006 5:21 pm
Forum: C++ Development
Topic: wxTextCtrl problem
Replies: 15
Views: 2330

It works. Here is the output: 4,0,4 9,5,9 14,10,14 19,15,19 Which is as expected. :) However no text gets selected...... Not even the first time, as it did before? :? :!: Um, I suppose the loss of focus from the wxLogMessage just could be to blame...? Yeah. :shock: :? Here it is...... bool Editor::...
by sethjackson
Mon Jun 12, 2006 4:42 pm
Forum: C++ Development
Topic: wxTextCtrl problem
Replies: 15
Views: 2330

I presume you were using the 'deselect the text by clicking right after the first "text" instance' method to get it to increment. What if you change to: ... long startPos = (flags & wxFR_DOWN) ? GetInsertionPoint() + m_foundPos : m_foundPos; long endPos = startPos + find.length(); wxLogMessage(wxT(...
by sethjackson
Mon Jun 12, 2006 3:41 pm
Forum: C++ Development
Topic: wxTextCtrl problem
Replies: 15
Views: 2330

Hmm. :? What do you get from putting wxLogDebug(wxT("%ld %ld %ld", GetInsertionPoint(), startPos, endPos); just before the 'find', and at the end? Well I don't have debug build, but here is the output with wxLogMessage(). 0, 0, 4 5, 5, 9 9, 10, 14 14, 15, 19 Here is the code: bool Editor::Find(cons...
by sethjackson
Mon Jun 12, 2006 2:31 pm
Forum: C++ Development
Topic: wxTextCtrl problem
Replies: 15
Views: 2330

Neither of those helped. :(
by sethjackson
Mon Jun 12, 2006 1:11 pm
Forum: C++ Development
Topic: wxTextCtrl problem
Replies: 15
Views: 2330

wxTextCtrl problem

I have a small problem. Editor derives from wxTextCtrl. bool Editor::Find(const wxString& find, int flags) { m_findString = find; m_findFlags = flags; wxString string = (flags & wxFR_DOWN) ? GetRange(GetInsertionPoint(), GetLastPosition()) : GetRange(0, GetInsertionPoint()); if (flags & wxFR_MATCHCA...
by sethjackson
Fri Jun 09, 2006 8:32 pm
Forum: C++ Development
Topic: Finding text
Replies: 5
Views: 814

In support to what DavidHart posted: // rfind() family is exactly like find() but works right to left // as find, but from the end size_t rfind(const wxString& str, size_t nStart = npos) const; // as find, but from the end size_t rfind(const char* sz, size_t nStart = npos, size_t n = npos) const; /...
by sethjackson
Fri Jun 09, 2006 8:31 pm
Forum: C++ Development
Topic: Finding text
Replies: 5
Views: 814

DavidHart wrote:Hi,

Assuming that I understand correctly what you're doing/asking, you should be able to get the portion of the string to search by using string = GetRange(0, GetInsertionPoint()); and then use rfind instead of find.

Regards,

David
Duh. Thanks. :D
by sethjackson
Fri Jun 09, 2006 8:02 pm
Forum: C++ Development
Topic: Finding text
Replies: 5
Views: 814

protocol wrote:Just reverse the text you are searching through and then begin the find.
How to do that?
by sethjackson
Fri Jun 09, 2006 7:32 pm
Forum: C++ Development
Topic: Finding text
Replies: 5
Views: 814

Finding text

Editor derives from wxTextCtrl. :) bool Editor::Find(const wxString& find, int flags) { m_findString = find; m_findFlags = flags; //SetSelection(GetInsertionPoint(), GetInsertionPoint()); wxString string; if (flags & wxFR_DOWN) string = GetRange(GetInsertionPoint(), GetLastPosition()); else string =...
by sethjackson
Wed Jun 07, 2006 2:25 pm
Forum: C++ Development
Topic: wxSystemOptions
Replies: 3
Views: 643

protocol wrote:Check out: http://www.codeproject.com/tips/DetectTheme.asp

best regards.
Yeah, but wxSystemOptions should just work fine no? I really don't want to use the Win API directly in my app......
by sethjackson
Wed Jun 07, 2006 2:16 pm
Forum: C++ Development
Topic: wxSystemOptions
Replies: 3
Views: 643

wxSystemOptions

Hi I have a problem with this code. if (wxSystemOptions::GetOptionInt(_T("msw.notebook.themed-background")) != 0) { menu->Enable(idTabsAtTop, false); menu->Enable(idTabsAtBottom, false) } Now what happens is that if I use a manifest for my app the menu options are not grayed out..... If I change to ...