I have create a form using hiCreateAppForm(), and when the form was invoked, the cursor will automatically focus on the first editable field, but will not select the content of that field.
I want to make the select automatically, so I can change the content directly by using keyboard. Is there any ways to implement it?
Another question: Is there any ways to remove the “Help” button from the form?
Thank you, Andrew.
I will test the code at next Monday, have a nice weekend to you.
Thanks for your help. I have tested the code, and it solve my problem.
But I have a query about the function “hiInserBannerMenu()”, why we shouldn’t use this command to insert menu? Does “deRegUserTriggers()” insert myMenu automatically at the last position of banner menu?
And my another question is how to close the user-defined form together when we close the layout window? I find after the layout close, the form that I created is still here.
The whole point of the banner menu is that you return a list of banner menus for the Design Editor infrastructure to take care of adding into the banners. That way it knows about them and when you switch application they will get removed too. If you try to add them yourself (most commonly I see people doing this through the user post-install trigger) it can sometimes cause trouble with other applications that can end up fighting with you!
For closing the form (assuming you just mean to close it rather than delete the form data structure), you could register a close proc with hiRegCloseProc (probably from within a post-install trigger registered with deRegUserTriggers) which could then call hiFormCancel. If you wanted to delete the form, then you would be best served to register a trigger with dbRegPurgeTrigger which does an hiCancelForm, an hiFormDelete, and then sets the value of the form symbol to 'unbound. I probably wouldn't bother though because I doubt you'll end up with that many that it's worth cleaning up this way - but if you were going to do it, I'm suggesting the purge trigger just in case you have two windows open on the same layout cellView at the same time.