Search found 90 matches

by Everydaydiesel
Sun Aug 19, 2018 1:25 am
Forum: wxCode
Topic: wxPdfDocument Calculating Text Height [SOLVED]
Replies: 1
Views: 339

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: 373

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: 373

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: 373

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: 402

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: 402

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: 56

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: 56

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: 103

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: 663

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: 663

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: 663

Re: help drawing this on device context

Is it possible to draw with opengl inside of a wxwidgets wxPanel?
by Everydaydiesel
Sun Apr 22, 2018 10:37 pm
Forum: C++ Development
Topic: help drawing this on device context
Replies: 19
Views: 663

Re: help drawing this on device context

Thank you for helping.

wx-config --version 3.0.2
uname -a Linux user-desktop 4.13.0-38-generic #43~16.04.1-Ubuntu SMP Wed Mar 14 17:48:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
os: linux mint 18.3 - kde plasma: 5.8.8
compiler: codeblocks 16.01
by Everydaydiesel
Sun Apr 22, 2018 6:25 pm
Forum: C++ Development
Topic: help drawing this on device context
Replies: 19
Views: 663

Re: help drawing this on device context

Now it is working! Other then graphing more coordinates. Does anyone have any advice on smoothing the rough edges of the lines? https://i.imgur.com/uwCTd2g.png Edit: I see this post https://forums.wxwidgets.org/viewtopic.php?p=66885#66885 I linked gdiplus but the #if wxUSE_GRAPHICS_CONTEXT is grayed...
by Everydaydiesel
Sun Apr 22, 2018 1:11 pm
Forum: C++ Development
Topic: help drawing this on device context
Replies: 19
Views: 663

Re: help drawing this on device context

This one looks closer but is still missing something https://i.imgur.com/XlnB4lR.png vector<int> lssX; vector<int> lssY; int iOldX = 0; int iOldY = 100; wxColor colWhite = wxColor(255, 255, 255); wxColor colRed = wxColor(255, 0, 0); wxPaintDC dc(Panel1); wxRect rect = Panel1->GetClientRect(); lssX.p...

Go to advanced search