Search found 15147 matches

by doublemax
Wed Oct 14, 2020 3:43 pm
Forum: C++ Development
Topic: wxScrollbar with label over scroll component
Replies: 1
Views: 61

Re: wxScrollbar with label over scroll component

Are there any built-in functions/controls capable of this? No. If not, how can I implement it in wxWidgets? As wxWidgets uses native controls where ever possible, scollbars are native, too. It's not easily possible to draw anything on top of a native control. The only option i see is to write a 100...
by doublemax
Wed Oct 14, 2020 6:02 am
Forum: C++ Development
Topic: Drawing Transparent Control on panel
Replies: 13
Views: 594

Re: Drawing Transparent Control on panel

Use wxTreeCtrl::GetBoundingRect to get the rectangle of the item. Pass the tree control itself and this rect to the Showfor() call.
by doublemax
Tue Oct 13, 2020 8:58 pm
Forum: Compiler / Linking / IDE Related
Topic: How must build to produce those libs on Win10?
Replies: 14
Views: 326

Re: How must build to produce those libs on Win10?

lwxmsw30ud_dbgrid.a, libwxbase30ud_odbc.a, libwxmsw30ud_qa.a and that the product is 30, no 31...
These don't exist any more in wx 3.1.x. And the 31 vs 30 is because of the different wxWidgets version, too.
by doublemax
Tue Oct 13, 2020 8:53 pm
Forum: C++ Development
Topic: How to centre ( and fill ) text in wxRect using a dynamic font size
Replies: 2
Views: 145

Re: How to centre ( and fill ) text in wxRect using a dynamic font size

There is nothing in wxWidgets that does this for you automatically. Pick a random font size, use wxDC::GetMultiLineTextExtent to calculate the size that you get, compare it with the size that you want, calculate a correction factor for the font size. Repeat until you're close enough to the target si...
by doublemax
Tue Oct 13, 2020 5:11 am
Forum: Compiler / Linking / IDE Related
Topic: Mac Catalina - wx-widgets no such file or directory
Replies: 1
Views: 55

Re: Mac Catalina - wx-widgets no such file or directory

The commands `wx-config –libs` `wx-config –cxxflags` must be in backticks, not single quotes. Notice the ` instead of '

Code: Select all

g++ helloapp.cpp `wx-config –libs` `wx-config –cxxflags` -o helloapp
by doublemax
Sun Oct 11, 2020 7:56 am
Forum: C++ Development
Topic: how can this be a window id?
Replies: 1
Views: 78

Re: how can this be a window id?

I'm not sure what you're referring to. In none of these examples is "this" used as an ID. For wxButton and wxPanel the first two parameters are "wxWindow *parent, wxWindowID id". wxWindowID ist just an int. So "this" is used as "wxWindow *". As for the Bind call. The matching overload is this: Bind ...
by doublemax
Sat Oct 10, 2020 6:10 pm
Forum: Compiler / Linking / IDE Related
Topic: Windows package creator/installer
Replies: 8
Views: 255

Re: Windows package creator/installer

The technical process of signing is relatively simple: https://docs.microsoft.com/en-us/dotnet/framework/tools/signtool-exe The main issue is to get a code signing certificate. Depending on where you live, whether you're developing an open source or commercial application and whether you have a regi...
by doublemax
Sat Oct 10, 2020 7:40 am
Forum: C++ Development
Topic: wxGetenv() underMSW
Replies: 2
Views: 96

Re: wxGetenv() underMSW

https://docs.wxwidgets.org/trunk/group_ ... seros.html

Check wxGetHomeDir () and wxGetUserName ()

BTW:

Code: Select all

wxString user = wxGetenv("USERNAME"); 
should have worker under Windows.
by doublemax
Sat Oct 10, 2020 7:35 am
Forum: C++ Development
Topic: [wxMSW][wx3.0.3] Showing hand cursor only above bitmap of wxDataViewListCtrl's bitmap column
Replies: 4
Views: 157

Re: [wxMSW][wx3.0.3] Showing hand cursor only above bitmap of wxDataViewListCtrl's bitmap column

Use wxDataViewCtrl::GetItemRect to get the rect for the cell. If the bitmap is always 20x20 and centered, you can calculate its exact coordinates and check if the mouse cursor is inside.
by doublemax
Fri Oct 09, 2020 11:29 pm
Forum: C++ Development
Topic: WxWidgets Responsive Chat - Newbie
Replies: 2
Views: 117

Re: WxWidgets Responsive Chat - Newbie

In wxWidgets "sizers" (class name wxSizer) are used to create dynamic gui layouts. Please check these pages: https://docs.wxwidgets.org/trunk/overview_sizer.html http://neume.sourceforge.net/sizerdemo/ It's best to write a simple app with two controls and play around with the sizer parameters. Once ...
by doublemax
Fri Oct 09, 2020 10:17 pm
Forum: C++ Development
Topic: Deallocate memory of wxGrid
Replies: 10
Views: 259

Re: Deallocate memory of wxGrid

Recreating a control in-place is always a little tricky. Maybe it's easier to add/remove cols/rows with the respective methods to match the new row/col count. (Or delete all rows/cols and then add new ones from scratch). wxGrid::DeleteCols wxGrid::DeleteRows wxGrid::AppendCols wxGrid::AppendRows Aft...
by doublemax
Fri Oct 09, 2020 7:30 am
Forum: Platform Related Issues
Topic: Menus in 3.1.x on raspberrytouchscreen do not work with finger touch.
Replies: 1
Views: 96

Re: Menus in 3.1.x on raspberrytouchscreen do not work with finger touch.

There is already another ticket for this and it was concluded that this is a GTK issue.
http://trac.wxwidgets.org/ticket/18807
by doublemax
Fri Oct 09, 2020 7:27 am
Forum: C++ Development
Topic: Problem with bitmap
Replies: 5
Views: 209

Re: Problem with bitmap

is there any way to deal with coordinates in bitmap the same way as if it is array or table
I don't see where the problem is. Just consider the gridpanel class a black box where the method happens to take the parameters in x,y order. But you can of course change that yourself easily if you like.
by doublemax
Thu Oct 08, 2020 10:38 pm
Forum: C++ Development
Topic: Problem with bitmap
Replies: 5
Views: 209

Re: Problem with bitmap

Code: Select all

for(int i=0; i<row ; i++)
  for(int j=0; j<col ;j++)
    if(grid[i][j] == 1) // blocked = black
      gp->SetCellColor(i,j,black);
In this code "j" is "x" and "i" is "y". But SetCellColor() takes x first, then y. So just swap the parameters