Search found 40 matches

by bandali99
Wed Aug 21, 2019 10:25 pm
Forum: C++ Development
Topic: Multiple widget access
Replies: 8
Views: 1025

Re: Multiple widget access

my logic for this widget was that I would create a single slider (singlesliderobj). Then I created a class customwidgetslider where the function Oninit would create a sizer, playersizer, that has the slider. After I created a test class which uses the function multi that accesses the playersizer fr...
by bandali99
Wed Aug 21, 2019 7:05 pm
Forum: C++ Development
Topic: Multiple widget access
Replies: 8
Views: 1025

Re: Multiple widget access

There is definitely something wrong, but i can't tell you exactly where. I'd need more context. I checked your repo, but it doesn't seem to be updated to these changes. First of all, i don't see the purpose of customwidgetslider::Oninit(). Why don't you just create the slider in the constructor? Th...
by bandali99
Wed Aug 21, 2019 7:01 pm
Forum: C++ Development
Topic: Multiple widget access
Replies: 8
Views: 1025

Re: Multiple widget access

oops sorry I have like different slider projects this one is the n slider widget here is the repo for it https://github.com/fahadbandali/thensliderwidget
by bandali99
Wed Aug 21, 2019 3:29 pm
Forum: C++ Development
Topic: Multiple widget access
Replies: 8
Views: 1025

Re: Multiple widget access

The code above is for a class called customwidgetslider. I used this class in another class called test where I am able to create multiple custom widgets on the frame. Here is the class for the customwidgetsldier along with the function I call, I changed it from the last post (I was trying different...
by bandali99
Tue Aug 20, 2019 10:13 pm
Forum: C++ Development
Topic: Multiple widget access
Replies: 8
Views: 1025

Multiple widget access

I built this function that when called it created and organizes a custom widget for me. For some reason, I am only able to access the slider when coding it the way I have shown or by using another sizer (slidersizer). But when I change the order and add the slider widget last I am able to use the ot...
by bandali99
Tue Aug 20, 2019 4:52 pm
Forum: C++ Development
Topic: flickering
Replies: 1
Views: 369

flickering

I created a custom slider using wxPaintDC, then created a custom widget class where I created checkboxes, text and used sizers to format the widget. I used another class, test, as a frame to input multiple custom widgets. In the test class, I used refresh and update after setting all the sliders val...
by bandali99
Sat Aug 17, 2019 6:59 pm
Forum: C++ Development
Topic: Generating New ID
Replies: 3
Views: 778

Re: Generating New ID

What kind of object are you trying to create? If it's a wxWidgets class that takes an ID, use wxID_ANY. Then you can get the actual id that was assigned afterwards, e.g. with wxWindow::GetId(). If it's for another custom object, you could use ::wxNewId(). I'm creating a custom object with these par...
by bandali99
Fri Aug 16, 2019 10:44 pm
Forum: C++ Development
Topic: Generating New ID
Replies: 3
Views: 778

Generating New ID

I want to create an object that when created it has its own unique wxID. I saw in older posts that you can use wxNewId(); but it has been deprecated? Is there any way I could generate them at runtime?
by bandali99
Wed Aug 14, 2019 6:51 pm
Forum: C++ Development
Topic: Connecting objects
Replies: 1
Views: 442

Connecting objects

is it possible to connect two objects, if I move one of them then the other will move the same amount? To be more clear I have created multiple sliders and I want to be able to sync them. I was thinking that I need to create a function in the widget class but I have no idea how to start it any help ...
by bandali99
Tue Aug 13, 2019 9:20 pm
Forum: C++ Development
Topic: BoxSizers
Replies: 1
Views: 554

BoxSizers

Hi, I am using boxsizers to create a timeline media player. I used a similar format from an older media player I had made early (thanks to doublemax). I'm running into two formating issues the first being that I want to scale the media bars in relation to the longest bar. Currently, I have them comp...
by bandali99
Tue Aug 13, 2019 4:46 pm
Forum: C++ Development
Topic: Binding issue: uninitialized local variable
Replies: 5
Views: 851

Re: Binding issue: uninitialized local variable

where you created this object? you just declared pointer to this object, not created object itself. whre is something like - slidercontrol* checkslider = new slidercontrol(...); Just tried that and there are no errors in the code now however when I run it the widget and the checkbox are not linked ...
by bandali99
Tue Aug 13, 2019 4:21 pm
Forum: C++ Development
Topic: Binding issue: uninitialized local variable
Replies: 5
Views: 851

Re: Binding issue: uninitialized local variable

you just declared "checkslider", but not assigned any value to it. and later use it as something assigned. for example if you declared: int my_burth_date; how your real birth date was assigned to it? The checkslider object has dynamically changing values based on what the user check marks...
by bandali99
Tue Aug 13, 2019 3:58 pm
Forum: C++ Development
Topic: Binding issue: uninitialized local variable
Replies: 5
Views: 851

Binding issue: uninitialized local variable

Hi, I created a separate window and I want to connect it to a widget on another window. I used the bind function and included the header files but when I run the file "uninitialized local variable" error appeared. What did I do wrong? slidercontrol* checkslider; selectedslider = checkslide...
by bandali99
Fri Aug 02, 2019 7:42 pm
Forum: C++ Development
Topic: Opening a frame within a menu bar
Replies: 12
Views: 1697

Re: Opening a frame within a menu bar

thanks going to try this now!
by bandali99
Fri Aug 02, 2019 7:26 pm
Forum: C++ Development
Topic: Opening a frame within a menu bar
Replies: 12
Views: 1697

Re: Opening a frame within a menu bar

Bind(wxEVT_COMMAND_MENU_SELECTED, &SimpleMenu::OnQuit, this); Bind(wxEVT_COMMAND_MENU_SELECTED, &SimpleMenu::Ontwo, this); Here is my code for binding the function to the command menu selected menubar = new wxMenuBar; file = new wxMenu; file->Append(wxID_EXIT, wxT("&Quit")); f...