Quantcast
Channel: Jason Andrews Blog
Viewing all articles
Browse latest Browse all 33813

Custom "window"-ed form, assign "Enter" for specific callback.

$
0
0
Hi everyone. I've stumbled across an issue that I couldn't solve myself by reading though skuiref.pdf or any other related document or discussion. I've created a custom tool with a GUI. Using hiCreateAppForm I was able to specify a callback to be executed when "Enter" button is pressed. I achieved this by setting ?callback and ?buttonLayout in the corresponding way: hiCreateAppForm ( ... ?buttonLayout 'ApplyCancel ?callback "myCB()" ... ) With it, user was able to swiftly type a term in a search field and press "Enter" to initiate the query ( myCB() ). So far, so good. However, I recently decided to put the my form into a window, thus it can be effectively min/maximized by user and allows me to add new menus in the banner field. Everything works smoothly, but since the form is now "Window"-ed , ? buttonLayout 'ApplyCancel and ?callback "myCB()" are no longer effective since the GUI does not have native Apply/Cancel buttons anymore. My question : is there a way to specify a default callback to be executed when Enter button is pressed, for a Window-ed form? As an example of what I'm trying to achieve is "Go" button in SKILL API Finder. hiCreateWindow does not have any parameter that resembles buttonLayout & callback functionality and I couldn't identify a key binding function that would accept win_Id as input. Any help would be much appreciated! Regards, Boris

Viewing all articles
Browse latest Browse all 33813

Trending Articles