Bryan Bui-Tuong wrote:
> So I'm trying to create multiple buttons through a function:
>
> static DFBResult Init_Button( LiteWindow *window, LiteButton *button, const
> char *image_off, const char *image_on, DFBRectangle *rect )
> {
> DFBResult ret;
> ret = lite_new_button( LITE_BOX(window), rect,
> liteDefaultButtonTheme, &button);
This will not return the button the caller of Init_Button()!
> //lite_new_button( parent, &rect, liteNoButtonTheme, &button );
> lite_set_button_image( button, LITE_BS_NORMAL, image_off );
> lite_set_button_image( button, LITE_BS_PRESSED, image_on );
>
> return ret;
> }
>
>
> And then in another function I want to change the states of the button:
>
> lite_set_button_state(mainwin->btn_data, LITE_BS_PRESSED);
>
>
> When I do this nothing happens, but when I create the button in the main
> function and change the state in that same function it works. Why is this?
> Is there something I am missing or need to add/change in order to do this?
static DFBResult Init_Button( LiteWindow *window, LiteButton **button, const
char *image_off, const char *image_on, DFBRectangle *rect )
{
DFBResult ret;
ret = lite_new_button( LITE_BOX(window), rect,
liteDefaultButtonTheme, button);
--
Best regards,
Denis Oliver Kropp
.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/ |
"------------------------------------------"
_______________________________________________
directfb-users mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users