Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

wxRuby custom controls

Hi,

I've been working with wxRuby for quite a while now and I know pretty much how most of the controls work.

I'm now at a point where even a nifty combination of all the available controls are not enough for me. I'd like to create my own controls that would basically be a mix between multiple of the original widgets, such as wxTreeCtrl and wxListCtrl.

So does anyone know how I can create my own controls?
I guess I will have to take a look at wxWidgets source code and code it in C++, but I was wondering if anyone had any experience with this.

Thanks,
- Dargor
 

e

Sponsor

You can create Decorators, which would simply be a mix-in of multiple controls that provide a unified interface. I'm not sure how advanced you need these to be.
 
the hard part about creating custom controls is that you have to tell them how to be drawn. its not as simple as slapping some code from both objects together, you'll have to handle events you want the control to receive ect.

however before you endeavorer to create your control form scratch look around it might have already been written. perhaps in an auxiliary library to wxRuby
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top