Fabien Comte Posted July 18, 2018 Report Share Posted July 18, 2018 Hello, I want to hide a button before animate another one. That doesn't work (strange colors at old position): gwinSetVisible(ghPushbutton1, FALSE); GWidgetObject * temp_control = ((GWidgetObject *) ghPushbutton1); gdispGFillArea(temp_control->g.display, temp_control->g.x - border, temp_control->g.y - border, temp_control->g.width + 2 * border, temp_control->g.height + 2 * border, GFX_BLACK); That works (hidden but can be clicked): GWidgetObject * temp_control = ((GWidgetObject *) ghPushbutton1); gdispGFillArea(temp_control->g.display, temp_control->g.x - border, temp_control->g.y - border, temp_control->g.width + 2 * border, temp_control->g.height + 2 * border, GFX_BLACK); It looks like if set invisible launched a background task. Do I missed something ? Link to comment Share on other sites More sharing options...
Fabien Comte Posted July 18, 2018 Author Report Share Posted July 18, 2018 i replaced gwinSetVisible(ghPushbutton1, FALSE); with ghPushbutton1->flags = ghPushbutton1->flags & ~GWIN_FLG_SYSVISIBLE; and it works Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted July 18, 2018 Report Share Posted July 18, 2018 Can you post a screenshot that shows the problem? Also, there are the high-level calls gwinHide() and gwinShow() which you should use. gwinSetVisible() is fine too though, but check the last parameter. You should definitely not manually touch the flags. Link to comment Share on other sites More sharing options...
Fabien Comte Posted July 31, 2018 Author Report Share Posted July 31, 2018 Hello, It's more complex that i imaginated. I tried to move on GWIN_REDRAW_IMMEDIATE = GFX_ON but gwinHide(ghMyPageContainer1); is never goes out. Do i missed something ? Link to comment Share on other sites More sharing options...
Fabien Comte Posted July 31, 2018 Author Report Share Posted July 31, 2018 Ok i found about the lock, my mistake sorry. Link to comment Share on other sites More sharing options...
inmarket Posted August 4, 2018 Report Share Posted August 4, 2018 If you are directly drawing using GDISP calls, or manipulating GWIN flags directly, or having to understand the drawing lock then you are definitely approaching the problem incorrectly. Link to comment Share on other sites More sharing options...
Fabien Comte Posted August 4, 2018 Author Report Share Posted August 4, 2018 Ok i found, there was a timer that sometimes was fighting against me. I moved to immediate configuration and i was able to do everything i wanted. Thank you all people for your help. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now