How to disable Softkey in Forms and then again Enable it. | developer.brewmp.com How to disable Softkey in Forms and then again Enable it. | developer.brewmp.com

Developer

How to disable Softkey in Forms and then again Enable it.

Hi,
I am trying this thing to disable the softkeys in the rootform and then enable it later on. This is not working

nErr = ISHELL_CreateInstance(me->pIShell, AEECLSID_SOFTKEYWIDGET, (void **)&Softkey_Wid);
IROOTFORM_HandleEvent(me->piRootForm,EVT_WDG_GETPROPERTY,WID_SOFTKEYS,(uint32)(&Softkey_Wid));
IFORM_SetWidget(me->piRootForm, WID_SOFTKEYS, NULL); // Line 1
..
..
..
IFORM_SetWidget(me->piRootForm, WID_SOFTKEYS, Softkey_Wid); // Line 2

IFORM_SetSoftkey(me->piForm,FID_SOFTKEY1,soft_text1); //
IFORM_SetSoftkey(me->piForm,FID_SOFTKEY2,soft_text2);

nErr = IROOTFORM_PushForm(me->piRootForm, me->piForm);

///////////////////////

Now when I use the above code, then the Softkey area is visible but the text does not appear in the SOftkeys.

Now if I comment Line 1 then the softkeys appear correctly with text, and if I only comment Line 2 then there is no softkey area visible.
So my problem is that once I set the softkey widget to NULL then the softkey area is totally invisible which is fine. But if later I want the softkeys then i could enable the softkey area but could not write back to the softkey area. The "Softkey_Wid" variable is Global so that also does not pose any problem.
Please Help..

Manish

Could you use:
IFORM_SetSoftkeys(me->piRootForm, RES_FILE_NAME, 0, 0); ?

Could you use:
IFORM_SetSoftkeys(me->piRootForm, RES_FILE_NAME, 0, 0); ?

That will just set the text of the softkeys to blank.
I actually need to disable the softkey area itself. That means i dont want any area dedicated to softkey so that all client area is available to background container.
And then reset the softkey area later when I need it.

That will just set the text of the softkeys to blank.
I actually need to disable the softkey area itself. That means i dont want any area dedicated to softkey so that all client area is available to background container.
And then reset the softkey area later when I need it.

I think it is very difficult to implement!
The softkey widget created in the rootform, and it is always visible, and so is the title.

I think it is very difficult to implement!
The softkey widget created in the rootform, and it is always visible, and so is the title.

Set FID_ACTIVE property to TRUE by calling IFORM_SetProperty() after setting the softkeys.

Set FID_ACTIVE property to TRUE by calling IFORM_SetProperty() after setting the softkeys.

If you want to remove the softkey bar, then in the form handler, handle the FID_PREFRECT event and set the rect accordingly. The dwparam would be pointer to the AEERect.

If you want to remove the softkey bar, then in the form handler, handle the FID_PREFRECT event and set the rect accordingly. The dwparam would be pointer to the AEERect.