Hi,
I have some custom widgets in my project and I have noticed that when they are added to a FrameWin they do not notify its parent as expected.
The framewin is created like this:
The custom widgets are added on the WM_INIT_DIALOG:
Display All
The problem happens here:
Display All
So, the methods ManCb(pMsg) and SpinTextCb(pMsg) never execute. In my opinion because the widgets are kinda of outside the frame. I need to know how to tell the framewin that the widgets are indeed inside the frame.
I tested the same kind of implementation with a usual window, not a framewin, and everything worked just fine.
Thanks.
I have some custom widgets in my project and I have noticed that when they are added to a FrameWin they do not notify its parent as expected.
The framewin is created like this:
C Source Code
- static const GUI_WIDGET_CREATE_INFO widget_info[] =
- {
- { FRAMEWIN_CreateIndirect, NULL, WDG_FRAMEWIN, 0, 0, 400, 235, 0 },
- // Custom Widget - Manifold Id
- { TEXT_CreateIndirect, NULL, WDG_TXT_PRODUCT, 20, 75, 100, 50, 0, 0, 0 },
- // Custom Widget - Product
- { BUTTON_CreateIndirect, NULL, WDG_BTN_CLOSE, 125, 145, 150, 45, 0, 0, 0 }
- };
The custom widgets are added on the WM_INIT_DIALOG:
C Source Code
- case WM_INIT_DIALOG:
- {
- // ...
- snprintf(tmp_array, TempArraySize, "%s", "Configuration");
- FRAMEWIN_SetText(my_hd, tmp_array);
- // Custom Widget.
- g_spin_text[SPIN_TEXT_MAN] = SPIN_TEXT_BOX_create(50, 50, 300, 50, my_hd, WM_CF_SHOW);
- // ...
- // Custom Widget - Spin text box
- g_spin_text[SPIN_TEXT_PRODUCT] = SPIN_TEXT_BOX_create(130, 110, 250, 50, my_hd, WM_CF_SHOW);
- tmp_hd = WM_GetDialogItem(my_hd, WDG_BTN_CLOSE);
- BUTTON_SetText(tmp_hd, _tCLOSE);
- // ...
- }
The problem happens here:
C Source Code
So, the methods ManCb(pMsg) and SpinTextCb(pMsg) never execute. In my opinion because the widgets are kinda of outside the frame. I need to know how to tell the framewin that the widgets are indeed inside the frame.
I tested the same kind of implementation with a usual window, not a framewin, and everything worked just fine.
Thanks.