Search found 93 matches

by Everydaydiesel
Thu Oct 04, 2018 9:12 pm
Forum: C++ Development
Topic: Iterating Over All Tree Items in wxTreeCtrl
Replies: 2
Views: 89

Iterating Over All Tree Items in wxTreeCtrl

Hello, I have the following recursive code but the problem is that it does not iterate over the last tree view item. I am unsure why really. void Form::GetAllTreeViewItems(wxTreeCtrl *tv, const wxTreeItemId& tiiCurrent) { wxTreeItemIdValue cookie; wxTreeItemId child = tv->GetFirstChild(tiiCurren...
by Everydaydiesel
Thu Oct 04, 2018 3:27 pm
Forum: C++ Development
Topic: wxImageList invalid use of incomplete type [SOLVED]
Replies: 2
Views: 342

Re: wxImageList invalid use of incomplete type [SOLVED]

doh. i spent entirely too long on this! Thanks for the help
by Everydaydiesel
Thu Oct 04, 2018 3:14 pm
Forum: C++ Development
Topic: wxImageList invalid use of incomplete type [SOLVED]
Replies: 2
Views: 342

wxImageList invalid use of incomplete type [SOLVED]

Hello I am trying to add icons to a wxTreeCtrl and I am setting up the wxImageList and get the error error: invalid use of incomplete type 'class wxImageList' wxImageList *imgList; wxBitmap bmps[2]; bmps[0] = wxIcon(BASE_IMAGE_ICON_PATH + "Filetype-jpg-icon.png"); bmps[1] = wxIcon(BASE_IMA...
by Everydaydiesel
Sun Aug 19, 2018 1:25 am
Forum: wxCode
Topic: wxPdfDocument Calculating Text Height [SOLVED]
Replies: 1
Views: 1050

wxPdfDocument Calculating Text Height [SOLVED]

Hello,

I see a GetStringWidth but I do not see one for height? Am I missing it?


Thanks again!
by Everydaydiesel
Sun Aug 19, 2018 12:51 am
Forum: wxCode
Topic: wxPdfDocument SetAutoPageBreak Not Working [SOLVED]
Replies: 3
Views: 1099

Re: wxPdfDocument SetAutoPageBreak Not Working [SOLVED]

so if I have a pdf (report) that has 4 columns.

How can I print 4 header labels and then align them with the columns for each row?

Lets say i have a column that starts at 10, 100, 150, and 250.
by Everydaydiesel
Sat Aug 18, 2018 10:30 pm
Forum: wxCode
Topic: wxPdfDocument SetAutoPageBreak Not Working [SOLVED]
Replies: 3
Views: 1099

Re: wxPdfDocument SetAutoPageBreak Not Working [SOLVED]

thank you!!!


On last question, is there any way I can preview the pdf in a control (like rendering it inside of a wxPanel)
by Everydaydiesel
Sat Aug 18, 2018 8:42 pm
Forum: wxCode
Topic: wxPdfDocument SetAutoPageBreak Not Working [SOLVED]
Replies: 3
Views: 1099

wxPdfDocument SetAutoPageBreak Not Working [SOLVED]

Hello, I am trying to figure out the SetAutoPageBreak but it seems that I am not using it properly. Even though the loop goes to 250, the pdf document is only one page wxPdfDocument m_pdfDoc; wxPdfFontManager::GetFontManager()->AddSearchPath(wxT("/usr/share/fonts")); m_pdfDoc.SetAutoPageBr...
by Everydaydiesel
Fri Aug 17, 2018 3:05 am
Forum: wxCode
Topic: Getting Text Size With wxPdfDocument [SOLVED]
Replies: 2
Views: 1082

Re: Getting Text Size With wxPdfDocument [SOLVED]

Thank you kind sir! That worked!
by Everydaydiesel
Wed Aug 15, 2018 8:53 pm
Forum: wxCode
Topic: Getting Text Size With wxPdfDocument [SOLVED]
Replies: 2
Views: 1082

Getting Text Size With wxPdfDocument [SOLVED]

Hello, I am trying to use GetStringWidth() in wxPdfDocument and I was expecting the line drawn to be the same length as the text. Does anyone know what I am doing wrong? string sFilePath = "/home/test/test.pdf"; wxPdfFontManager::GetFontManager()->AddSearchPath(wxT("/usr/share/fonts&q...
by Everydaydiesel
Wed Aug 08, 2018 4:21 am
Forum: C++ Development
Topic: Capturing The Key Event In A wxTextCtrl
Replies: 1
Views: 89

Re: Capturing The Key Event In A wxTextCtrl

to answer my own question txtBaseFilePath->Connect(wxEVT_CHAR, wxCharEventHandler(PathKeyPress)); void PathKeyPress(wxKeyEvent& event) { // Ignore enter key in filename dialog if (event.GetKeyCode() == WXK_RETURN) { wxMessageBox("yes"); return; } // Process all other keys as usual even...
by Everydaydiesel
Tue Aug 07, 2018 10:42 pm
Forum: C++ Development
Topic: Capturing The Key Event In A wxTextCtrl
Replies: 1
Views: 89

Capturing The Key Event In A wxTextCtrl

Hello, I am trying to capture the 'enter' key on a wxTextCtrl but it tells me GetKeyCode it not a member of wxCommandEvent. Does anyone know how to capture keycode 13? void Dialog::OntxtBaseFilePathText(wxCommandEvent& event) { int iKeyCode = event.GetKeyCode(); if (iKeyCode == WXK_RETURN) { wxM...
by Everydaydiesel
Sat Jul 21, 2018 12:11 am
Forum: C++ Development
Topic: Best Variable Type For Currency / Formatting
Replies: 1
Views: 146

Best Variable Type For Currency / Formatting

Hello, I am trying to keep track of some prices as they change but I am not sure exactly the best variable for this. int will work if I multiply it by 100 (I need to keep 2 decimal places). what is the best way to write the int to a wxTextCtrl while showing only two decimal places. I am posting it o...
by Everydaydiesel
Thu May 10, 2018 4:41 am
Forum: C++ Development
Topic: help drawing this on device context
Replies: 19
Views: 822

Re: help drawing this on device context

So I was able to get AA to work properly but not on this code.. code from other thread wxPaintDC pdc(this); #if wxUSE_GRAPHICS_CONTEXT wxGCDC gdc( pdc ) ; wxDC &dc = m_useContext ? (wxDC&) gdc : (wxDC&) pdc ; #else wxDC &dc = pdc ; #endif PrepareDC(dc); my code using wxMemoryDC (draw...
by Everydaydiesel
Mon Apr 23, 2018 5:29 am
Forum: C++ Development
Topic: help drawing this on device context
Replies: 19
Views: 822

Re: help drawing this on device context

Maybe I should have done that from the start? When I search google and docs.wxwidgets.org i dont see any wxGLPanel documentation? Do you know how I would do this? Drawing with opengl seems to be pretty straight foward using glVertex2f https://www.ntu.edu.sg/home/ehchua/programming/opengl/CG_Introduc...
by Everydaydiesel
Sun Apr 22, 2018 11:48 pm
Forum: C++ Development
Topic: help drawing this on device context
Replies: 19
Views: 822

Re: help drawing this on device context

Is it possible to draw with opengl inside of a wxwidgets wxPanel?

Go to advanced search