Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6102255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:35:36+00:00 2026-05-23T13:35:36+00:00

I’m trying to make a user control in wxWidgets to represent a channel in

  • 0

I’m trying to make a user control in wxWidgets to represent a channel in an audio mixer. So, each channel has a standard set of controls inside itself (some sliders, buttons, etc..).

So inside my class I have a sizer in which I add the various child controls I need. So far that works.

But the problems I have are

  • if I derive from wxPanel, the layout of the control works as I expect it (it gets expanded in the sizer to fit the child controls), however none of the children get any events (like EVT_LEFT_DOWN etc). I tried connecting an event for the main control that runs event.Skip() but that didn’t help.

  • If I change my class to derive from wxControl instead (or wxFrame, or possibly a number of others I tried), the child controls do get events, but the whole thing doesn’t get expanded in the sizer it’s located in, it just gets drawn as a tiny box (some 10-20 square px) even though the child controls take up much more space.

Any ideas?

Update:

mangoMixerStrip.cpp

mangoMixerStrip::mangoMixerStrip(wxFrame* parent, HostChannel* channel) : wxPanel(parent)
{
    myChannel = channel;
    SetBackgroundColour(wxColour(172,81,90));

    wxBoxSizer* s = new wxBoxSizer(wxVERTICAL);

    // some custom controls i made which all work fine when added like any other control, derived from wxPanel also
    faderPan = new mangoFader(parent, 200, false, 55);
    faderGain = new mangoFader(parent, 200, true, 126);    
    buttonSolo = new mangoButton(parent, false, ButtonGraphic::Solo);

    s->Add(faderPan);
    s->Add(buttonSolo);
    s->Add(faderGain);

    this->SetSizer(s);

    this->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(mangoMixerStrip::mouseDown)); // this function simply contains event.Skip()
}

in my main wxFrame

mangoFrameMain::mangoFrameMain(wxWindow* parent) : FrameMain( parent )
{   
    HostChannel* h =  new HostChannel();
    h->setName("what up"); // these 2 lines unrelated to the UI

    mangoMixerStrip *test = new mangoMixerStrip(this, h);
    this->GetSizer()->Add(test, 1, wxFIXED_MINSIZE, 0);
}

And to clarify: the mangoMixerStrip instance itself gets any events I connect to it, but its child controls do not.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T13:35:37+00:00Added an answer on May 23, 2026 at 1:35 pm

    Your controls should be children of your class derived from wxPanel, NOT children of the panel’s parent.

       faderPan = new mangoFader(parent, 200, false, 55);
    

    should be

      faderPan = new mangoFader(this, 200, false, 55);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I am trying to render a haml file in a javascript response like so:
In my XML file chapters tag has more chapter tag.i need to display chapters

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.