Jump to content

Buttons - how to create a blinking button


Mih_Mih

Recommended Posts

You can either use the flashing property provided by GWIN (gwinSetFlashing()) or you can implement a custom widget that uses a GTIMER internally to render if you need more control.

Do not simply call gwinHide() and gwinShow() periodically. While that has visually the same effect you'll not get what you want as your button will not receive any events while not being visible (meaning you can't click it).

Link to comment
Share on other sites

Does not work :(

My Init and call function:

In "gfxconf.h"

#define GWIN_NEED_FLASHING         TRUE

/********************************************************/
/* GTIMER stuff                                         */
/********************************************************/
#define GFX_USE_GTIMER                                         TRUE

#define GTIMER_THREAD_PRIORITY                         NORMAL_PRIORITY
#define GTIMER_THREAD_WORKAREA_SIZE             2048

in "gui.c"

if (((GEventGWinButton *)pe)->gwin  == ghPushbutton_1) 

{

  gwinFlash(ghPushbutton_1);

}

Button not Blinking.....Do I need to include something else ??

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...