site  contact  subhomenews

Gtkdialog question

September 09, 2009 — BarryK
In the PPM there is a Find box with a Go button beside it. There is a request that pressing ENTER in the Find box should initiate the search.

However, if I put <action> tags within the <enter>, they run everytime a character is typed:

   <text><label>Find:</label></text>

<entry>
<variable>ENTRY1</variable>
<action>/usr/local/petget/findnames.sh</action>
<action>refresh:TREE1</action>
</entry>
<button>
<label>Go</label>
<action>/usr/local/petget/findnames.sh</action>
<action>refresh:TREE1</action>
</button>


Does anyone know how to set it so that the actions only run when the ENTER key is pressed?

Comments

re: gtkdialog code
Username: zigbert
[code] <text><label>Find:</label></text> <entry activates-default="true"> <variable>ENTRY1</variable> </entry> <button can-default="true" has-default="true" use-stock="true"> <label>Go</label> <action>/usr/local/petget/findnames.sh</action> <action>refresh:TREE1</action> </button>[/code]

gtkdialog code
Username: BarryK
"It works! Zigbert, thanks for that. Ah, there is an example: /usr/share/doc/gtkdialog3/examples/16.02.widget_properties_default ...which I did see before, but I didn't understand it.


Tags: woof