Hi guys,
I'm working with IAR and STemWin to create an ui for an application of us, builded for an ST32F429-Discovery board.
I've noticed a strange behaviour hiding/showing a widget, more specifically a button. Below my code:
Display All
This function is called every time the very first or very last widget of a "list" is reached, hiding the previous and next button respectively.
The strange thing is that after this "sequence" of actions, shown->hidden->shown, I'm not able to hide the button one more time. Debugging, the program reaches the right call and it seems to run the WM_*() function, but nothing changes.
Hope anyone can help me,
Many thanks
Andrea
I'm working with IAR and STemWin to create an ui for an application of us, builded for an ST32F429-Discovery board.
I've noticed a strange behaviour hiding/showing a widget, more specifically a button. Below my code:
Source Code
- typedef enum {
- navigation_button_Previous = 0,
- navigation_button_Next,
- navigation_button_Max
- } typ_Navigation_Button_ids;
- void CP_UI_Window_show_Navigation_Button(
- //! Button identifier
- typ_Navigation_Button_ids btn_id,
- //! Show/Hide
- bool show
- )
- {
- if( btn_id == navigation_button_Previous )
- {
- if( show )
- {
- WM_ShowWindow( h_button_Navigation_Previous );
- }
- else
- {
- WM_HideWindow( h_button_Navigation_Previous );
- }
- }
- else
- {
- if( show )
- {
- WM_ShowWindow( h_button_Navigation_Next );
- }
- else
- {
- WM_HideWindow( h_button_Navigation_Next );
- }
- }
- // Apply changes
- GUI_Exec();
- }
This function is called every time the very first or very last widget of a "list" is reached, hiding the previous and next button respectively.
The strange thing is that after this "sequence" of actions, shown->hidden->shown, I'm not able to hide the button one more time. Debugging, the program reaches the right call and it seems to run the WM_*() function, but nothing changes.
Hope anyone can help me,
Many thanks
Andrea