Search found 18 matches
- Sun Apr 16, 2023 9:36 am
- Forum: Component Writing
- Topic: wxGraphicsContext & wxAutoBufferedPaintDC
- Replies: 9
- Views: 3674
Re: wxGraphicsContext & wxAutoBufferedPaintDC
Hi, Another related question... can we change the PEN style & other parameters of path multiple times before actually drawing the path ? Like in this code... for( .... ) { // set pen1 pgc->SetPen( pn1 ); path.MoveToPoint( x, y ); path.AddLineToPoint( (x + plot_rect.m_width), y ); // now change t...
- Sun Apr 16, 2023 7:38 am
- Forum: Component Writing
- Topic: wxGraphicsContext & wxAutoBufferedPaintDC
- Replies: 9
- Views: 3674
Re: wxGraphicsContext & wxAutoBufferedPaintDC
Why do you call DrawPath() each time? Shouldn't that call be after the loop? That indeed improved things a lot. But I also observed that any PEN style other than SOLID & with width 1 or less(if we use wxGraphicsPenInfo) degrades the performance. Its most severe when PEN style is DOT. As the wid...
- Sun Apr 16, 2023 5:58 am
- Forum: Component Writing
- Topic: wxGraphicsContext & wxAutoBufferedPaintDC
- Replies: 9
- Views: 3674
Re: wxGraphicsContext & wxAutoBufferedPaintDC
Hi, Try to extract your component and put it into a separate minimal application.. I am testing with bare app, just few buttons & my component, nothing else. Do you see high cpu load during the 2-3 second delay you mentioned? No Or just simplify the drawing to something trivial that can be execu...
- Sat Apr 15, 2023 1:14 pm
- Forum: Component Writing
- Topic: wxGraphicsContext & wxAutoBufferedPaintDC
- Replies: 9
- Views: 3674
Re: wxGraphicsContext & wxAutoBufferedPaintDC
Hi, My component is covers nearly all of my MainFrame. But it currently it doesn't have much to draw. I have attached the screenshot of app before maximizing. And issue persists even if the size of mainframe is first manually increased by dragging the edges to nearly 80-90% of max possible size and ...
- Sat Apr 15, 2023 8:01 am
- Forum: Component Writing
- Topic: wxGraphicsContext & wxAutoBufferedPaintDC
- Replies: 9
- Views: 3674
wxGraphicsContext & wxAutoBufferedPaintDC
Hi, Re-Writing a custom component which previously used wxBufferedPaintDC. Used wxBufferedDC for background & text drawing and wxGraphicsContext for rest of drawing. Now I may trying to use wxAutoBufferedPaintDC & wxGraphicsContext for drawing. Everything is working, except a glitch during r...
- Sun Apr 12, 2020 8:02 pm
- Forum: Component Writing
- Topic: Mouse Events Issue
- Replies: 2
- Views: 10586
Mouse Events Issue
Hello, I am Writing a custom control & need to detect Mouse events. Been doing testing with wxFormBuilder to generate skeleton of my program while custom control is completely written independently. Here is the object 2 object trees of skeleton from wxFormBuilder, not_working.png working.png Thi...
- Wed Feb 12, 2020 5:27 am
- Forum: C++ Development
- Topic: wxProgressDialog Flicker
- Replies: 1
- Views: 475
wxProgressDialog Flicker
Hello, I am trying to use wxProgressDialog, with wxWidgets 3.0.4, and MSVC 2012 & mingw-gcc . Here are 2 lines of code I'm using, wxProgressDialog progress( APP_TITLE, _("Reading Records. Please Wait..."), m_MaxFTU, this, wxPD_APP_MODAL|wxPD_AUTO_HIDE|wxPD_SMOOTH ); // code updating 'i...
- Sat Sep 28, 2019 11:49 am
- Forum: C++ Development
- Topic: Muliti-Line Lables in wxGrid
- Replies: 4
- Views: 1012
Re: Muliti-Line Lables in wxGrid
Thanks a lot...doublemax wrote: ↑Sat Sep 28, 2019 9:03 am This works for me:Code: Select all
grid->UseNativeColHeader( false ); grid->SetColLabelValue(0, "line 1\nline 2");
sam_des
- Sat Sep 28, 2019 7:48 am
- Forum: C++ Development
- Topic: Muliti-Line Lables in wxGrid
- Replies: 4
- Views: 1012
Re: Muliti-Line Lables in wxGrid
Hi, Thanks for the reply, but that's not what I wanted to achieve. This wxGrid with Column lables, I am trying to achieve 2 row label using \n, which doesn't work, MultiLine-2.png & This is what I actually want, (this is from QtTableWidget, with \n you can have multiple lines) MultiLine-1.png Ac...
- Sat Sep 28, 2019 4:32 am
- Forum: C++ Development
- Topic: Muliti-Line Lables in wxGrid
- Replies: 4
- Views: 1012
Muliti-Line Lables in wxGrid
Hello, Is there is simple way of having Multi-line row or column labels in wxGrid? Instead of | COL-1 | COL-2 | BIG BIG BIG COL-3 | COL-4 | Like this (with center alignment)- | | | BIG BIG | | | COL-1 | COL-2 | BIG COL-3 | COL-4 | | | | | | No fancy stuff, just need to reduce the column width to fit...
- Mon Jul 22, 2019 5:07 pm
- Forum: Component Writing
- Topic: Making Background of Custom Widget Transparent
- Replies: 3
- Views: 11478
Re: Making Background of Custom Widget Transparent
Hi, Thanks for info. Background of the LED widget will be a bitmap/png/jpeg file, actually a map, loaded by the user on the fly. So background of LED widget may have multiple colors simultaneously. With circular LED shape, while background may be tolerable, but there can be Triangular shaped LED and...
- Sun Jul 21, 2019 3:12 pm
- Forum: Component Writing
- Topic: Making Background of Custom Widget Transparent
- Replies: 3
- Views: 11478
Making Background of Custom Widget Transparent
Hi, I have written a simple Custom Widget for LED using wxPanel. It includes nothing more than a circle with user selected On-Color & Off-Color. Everything works fine, when background of parent widget is white. As soon as background of parent widget turns dark, a white(or any other color which I...
- Tue Dec 26, 2017 3:12 am
- Forum: Compiler / Linking / IDE Related
- Topic: Custom Static Library Issue
- Replies: 3
- Views: 1421
Re: Custom Static Library Issue
Hello,
sam_des
Thanks a lot. Weird but including my library before WX libs solved the issue.Remember the order of objects and libraries matter in MinGW GCC.
sam_des
- Mon Dec 25, 2017 11:24 am
- Forum: Compiler / Linking / IDE Related
- Topic: Custom Static Library Issue
- Replies: 3
- Views: 1421
Custom Static Library Issue
Hello, I have WX application which compiles/runs good. Now I need a static Library of all my Custom Components which again I was able to generate using CodeBlocks. When I try to link this static lib with my application, I get linker complaining about of wxHtmlEasyPrinitng class references, ||=== Bui...
- Thu Aug 31, 2017 5:52 pm
- Forum: Component Writing
- Topic: wxGraphicsContex Text Drawing
- Replies: 9
- Views: 18472
Re: wxGraphicsContex Text Drawing
Hi, Drawing is quite complicated & require fast update, so I am using the buffered draw. Everything drawn onto a memory buffer/bitmap & Paint Event simply copies the buffer to screen. Just for testing, I tried drawing text directly from Paint Event, but without success. To reiterate, everyth...