HomePage > Software Index > Development > gtkdialog > Tips and Tricks

9.16 Press 'Enter' instead of clicking the 'Ok' button


When writing input to the app it is much easier to just press the 'Enter' key to activate <action>.

export ok_box='
<window>
 <vbox> 
  <entry activates_default="true"><default>press _enter_ to activate OK-button</default></entry>
  <hbox>
   <button can-default="true" has-default="true" use-stock="true">
	<input file icon="gtk-ok"></input>
	<label>Ok</label>
	<action>EXIT:ok</action>
   </button>
  </hbox>
 </vbox>
</window>'
gtkdialog -p ok_box



Categories
CategoryGtkdialog
There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki