Search found 13 matches

by sam_des
Sun Apr 12, 2020 8:02 pm
Forum: Component Writing
Topic: Mouse Events Issue
Replies: 2
Views: 281

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 This is...
by sam_des
Wed Feb 12, 2020 5:27 am
Forum: C++ Development
Topic: wxProgressDialog Flicker
Replies: 1
Views: 195

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' & reading fr...
by sam_des
Sat Sep 28, 2019 11:49 am
Forum: C++ Development
Topic: Muliti-Line Lables in wxGrid
Replies: 4
Views: 357

Re: Muliti-Line Lables in wxGrid

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");
Thanks a lot...

sam_des
by sam_des
Sat Sep 28, 2019 7:48 am
Forum: C++ Development
Topic: Muliti-Line Lables in wxGrid
Replies: 4
Views: 357

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 Actual...
by sam_des
Sat Sep 28, 2019 4:32 am
Forum: C++ Development
Topic: Muliti-Line Lables in wxGrid
Replies: 4
Views: 357

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...
by sam_des
Mon Jul 22, 2019 5:07 pm
Forum: Component Writing
Topic: Making Background of Custom Widget Transparent
Replies: 3
Views: 861

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...
by sam_des
Sun Jul 21, 2019 3:12 pm
Forum: Component Writing
Topic: Making Background of Custom Widget Transparent
Replies: 3
Views: 861

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 set...
by sam_des
Tue Dec 26, 2017 3:12 am
Forum: Compiler / Linking / IDE Related
Topic: Custom Static Library Issue
Replies: 3
Views: 767

Re: Custom Static Library Issue

Hello,
Remember the order of objects and libraries matter in MinGW GCC.
Thanks a lot. Weird but including my library before WX libs solved the issue.

sam_des
by sam_des
Mon Dec 25, 2017 11:24 am
Forum: Compiler / Linking / IDE Related
Topic: Custom Static Library Issue
Replies: 3
Views: 767

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...
by sam_des
Thu Aug 31, 2017 5:52 pm
Forum: Component Writing
Topic: wxGraphicsContex Text Drawing
Replies: 8
Views: 3705

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, everything work...
by sam_des
Wed Aug 30, 2017 6:03 pm
Forum: Component Writing
Topic: wxGraphicsContex Text Drawing
Replies: 8
Views: 3705

Re: wxGraphicsContex Text Drawing

This is my partial code, Some definitions, wxBitmap m_Buffer; m_WidgetBkColor = wxColor( 200, 200, 200 ); m_PlotBkColor = wxColor( 255, 255, 255 ); m_PlotLabelColor = wxColor( 0, 0, 0 ); m_PlotLabelFont = wxFont( 18, wxSWISS, wxFONTSTYLE_NORMAL, wxNORMAL, false, _("Elephant") ); Actual code, void Pl...
by sam_des
Wed Aug 30, 2017 3:12 pm
Forum: Component Writing
Topic: wxGraphicsContex Text Drawing
Replies: 8
Views: 3705

Re: wxGraphicsContex Text Drawing

Hello, Tried following things, 1) wxFont is valid 2) Created separate font in DrawBackground() itself, explicitly specifying different colour. 3) wxRect rc( GetClientSize() ) instead of wxRect rc = GetClientRect(). Although I do get correct x,y,h,w with original code too. 4) Disabled the background ...
by sam_des
Wed Aug 30, 2017 5:14 am
Forum: Component Writing
Topic: wxGraphicsContex Text Drawing
Replies: 8
Views: 3705

wxGraphicsContex Text Drawing

Hello, I am writing a custom control & using & wxBufferedPaintDC & wxGraphicsContext for it. I am able to draw rectangles, lines, circle etc. & its works as expected. But unable to draw the text. Nothing appears at all. I am using wxWidgets 3.0.3 & Code::Blocks/mingw void PlotWidget::DrawBackground(...