Jump to content

Tips and trick: how to make everything a button


king2

Recommended Posts

Just place a ordinary button over everything that you want to turn into button. Than override draw routine of button with function that draws nothing. You're done.

// define the function
void gwinButtonDraw_Clean(GWidgetObject *gw, void *param) {} // draws a huge piece of best nothing we can get for free

// use it
gwinSetCustomDraw(ghButton_settings, gwinButtonDraw_Clean, NULL);

Just receive events from this 'button' and do whatever you want to happen when user pressed, for example, a label.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...