Search found 70 matches

by saifcoder
Fri May 18, 2018 9:05 pm
Forum: C++ Development
Topic: Crash when create Dialog after Destroy()
Replies: 4
Views: 496

Crash when create Dialog after Destroy()

I have two Dialogs, with one button on each Dialog, i m just traying to Create and Show the Dialog, then Destroy it, and Create and Show it again ! Dialog 1, Button 1 if (!DIALOG_2_IS_CONSTRUCTED) { OBJ_DIALOG_2 = new DIALOG_2(); DIALOG_2_IS_CONSTRUCTED = true; } OBJ_DIALOG_2 ->Show(true); OBJ_DIALO...
by saifcoder
Tue May 15, 2018 3:27 pm
Forum: C++ Development
Topic: wxButton request
Replies: 3
Views: 480

Re: wxButton request

Please attache the constructor you are using, maybe something like this :

Code: Select all

Foo = new wxBitmapButton(this, ID, wxBitmap(wxImage(_T("Close.png"))), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW, wxDefaultValidator);
by saifcoder
Tue May 15, 2018 3:17 pm
Forum: C++ Development
Topic: wxformbuilder
Replies: 4
Views: 624

Re: wxformbuilder

So, Solved ;)
by saifcoder
Tue May 15, 2018 3:14 pm
Forum: C++ Development
Topic: Can the EVT_TEXT event be prevented on call to SetLabel()?
Replies: 2
Views: 335

Re: Can the EVT_TEXT event be prevented on call to SetLabel()?

wxTextEntry::ChangeValue()
This functions does not generate the wxEVT_TEXT event but otherwise is identical to SetValue().
If you find a difficulty.. tray use "Crooked ways" !

Code: Select all

bool IGN_EVENT = false
...
foo(){
	IGN_EVENT = true
	SetLabel()..
}

OnChange(){
	if (IGN_EVENT) return;
}
by saifcoder
Tue May 15, 2018 2:52 pm
Forum: C++ Development
Topic: custom class to manage controls
Replies: 3
Views: 500

Re: custom class to manage controls

First, i post this Topic quickly (at work), and i forget to attach Code Source !, Sorry.

Yes Eranon, you are right, even if this Class will manage only one type of control, this still "little complex for nothing", so i will tray to use "native" method !

Thank you
by saifcoder
Wed May 09, 2018 3:38 pm
Forum: C++ Development
Topic: custom class to manage controls
Replies: 3
Views: 500

custom class to manage controls

Hello, in my project, i need a Class to manage controls (Create, Change, Get, Set..), but didn't work for me ! Needs : Controls_Manager MyButton("Button", This, wxT("Caption"), wxPoint(20,30), wxSize(120, 35) ); wxPoint Test1 = MyButton.Get_Position(); MyButton.SetLabel("New Caption"); MyButton.Dest...
by saifcoder
Wed Nov 29, 2017 12:10 am
Forum: C++ Development
Topic: Characters looks like Chinese in zip
Replies: 11
Views: 1130

Re: Characters looks like Chinese in zip

is a wxWidgets Unicode build ?
by saifcoder
Thu Nov 16, 2017 11:10 pm
Forum: C++ Development
Topic: wxTreeCtrl weird events
Replies: 6
Views: 756

Re: wxTreeCtrl weird events

i think maybe its because you see the focused item, and not where event come from, in this situation don't use GetFocusedItem() or GetSelection(), but event.GetItem().

viewtopic.php?f=1&t=44032#p180501
by saifcoder
Thu Nov 16, 2017 10:48 pm
Forum: C++ Development
Topic: wxTreeCtrl - why events are always from selected ?
Replies: 1
Views: 261

Re: wxTreeCtrl - why events are always from selected ?

fixed.

dont use GetFocusedItem() or GetSelection() to get ID of non focused item, but use

Code: Select all

event.GetItem();
by saifcoder
Thu Nov 16, 2017 10:04 pm
Forum: C++ Development
Topic: wxTreeCtrl - why events are always from selected ?
Replies: 1
Views: 261

wxTreeCtrl - why events are always from selected ?

1 - just create a sample wxTreeCtrl control
2 - create two items
3 - then select item 1 (left click)
4 - right click on item 2
event come from item 1

Code: Select all

EVT_TREE_ITEM_MENU or EVT_TREE_ITEM_RIGHT_CLICK
GetFocusedItem() or GetSelection()

always return item 1, but we click right on item 2.