GtkBuilder : définition de paramètres pour mes widgets
Bonsoir,
je regarde le fonctionnement de la dernière interface GtkBuildable. J'essaie de construire une fenêtre dans laquelle je veux une table et 2 boutons (OK & Cancel) en bas.
A l'intérieur de la GtkTable je voudrais placer du contenu (un GtkLabel et un GtkEntry).
Le problème vient du fait que je ne trouve pas l'option me permettant de donner le placement de ces deux derniers widgets à l'intérieur de la GtkTable!
J'ai une seconde question : que signifie l'option "translatable"
Merci de votre aide :)
Edit : voici ce que j'ai pour le moment, ça pourrait vous servir ;)
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
|
<interface>
<object class="GtkDialog" id="dialog">
<property name="width-request">400</property>
<property name="height-request">400</property>
<property name="window-position">GTK_WIN_POS_CENTER_ALWAYS</property>
<property name="title">Search Panel</property>
<child internal-child="vbox">
<object class="GtkVBox" id="vbox_main">
<child internal-child="vbox">
<object class="GtkVBox" id="vbox_notebook">
<child>
<object class="GtkNotebook" id="notebook">
<property name="enable-popup">TRUE</property>
<property name="homogeneous">FALSE</property>
<property name="show-tabs">TRUE</property>
<property name="tab-pos">GTK_POS_TOP</property>
<child>
<object class="GtkTable" id="table_tab1">
<property name="column-spacing">5</property>
<property name="homogeneous">FALSE</property>
<property name="n-columns">2</property>
<property name="n-rows">10</property>
<property name="row-spacing">10</property>
<child>
<object class="GtkLabel" id="text_search_entry">
<property name="label">Text to search for : </property>
<property name="left-attach">0</property>
<property name="right-attach">1</property>
<property name="top-attach">0</property>
<property name="bottom-attach">1</property>
</object>
</child>
<child>
<object class="GtkEntry" id="search_entry">
<property name="text">Type your search here</property>
<property name="left-attach">1</property>
<property name="right-attach">0</property>
<property name="top-attach">1</property>
<property name="bottom-attach">2</property>
</object>
<!--
<object class="GtkEntryCompletion" id="search_entry">
<property name="inline-completion">TRUE</property>
<property name="inline-selection">TRUE</property>
<property name="minimum-key-length">4</property>
<property name="popup-completion">TRUE</property>
<property name="popup-single-match">TRUE</property>
</object>
-->
</child>
</object> <!-- End of table_tab1 -->
</child>
<child type="tab">
<object class="GtkLabel" id="tab1_notebook">
<property name="label">Current file</property>
</object>
</child>
</object> <!-- End of notebook -->
</child>
</object> <!-- End of vbox_notebook -->
</child>
<child internal-child="action_area">
<object class="GtkHButtonBox" id="button_box">
<property name="layout-style">GTK_BUTTONBOX_CENTER</property>
<child>
<object class="GtkButton" id="button_ok">
<property name="label">Ok</property>
<property name="use-stock">TRUE</property>
</object>
</child>
<child>
<object class="GtkButton" id="button_cancel">
<property name="label">Cancel</property>
<property name="use-stock">TRUE</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
<!--
<action-widgets>
<action-widget response="3">button_ok</action-widget>
<action-widget response="-5">button_cancel</action-widget>
</action-widgets>
-->
</interface> |