I am using Glade to make the form for a GtkEntry widget. I have it properly working in Julia to accept user input from GtkEntry widgets. My question is what setting will make the entered text appear in a mono spaced font? I have searched quite a bit on the Internet with little luck!
Julia code for glade form is below
# note 2022-10-12
# note use Gtk and Glade for gui input
# todo
# todo method of final completion of form
using Gtk
using Revise
println("Prog has started.")
function my_gui()
glade = GtkBuilder(filename = "JumpGUI.glade") # XML file created in glade
window = glade["ArchWindow"]
a1 = glade["a1"]
a2 = glade["a2"]
showall(window)
str1 = ""
str2 = ""
if isinteractive()
c1 = Condition()
signal_connect(window, "key-press-event") do widget, event
if event.keyval == 65293 #Enter
str1 = get_gtk_property(a1, :text, String)
str2 = get_gtk_property(a2, :text, String)
notify(c1)
end
end
wait(c1)
end
Gtk.destroy(window)
return str1, str2
end
s1, s2 = my_gui() # get the GtkEntry input text
@show(s1, s2)
println("Prog has ended.")
Glade xml file
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.40.0 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkWindow" id="ArchWindow">
<property name="can-focus">False</property>
<property name="title" translatable="yes">JuMP Window</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkEntry" id="a1">
<property name="name">a1</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="width-chars">0</property>
<property name="max-width-chars">0</property>
<property name="text" translatable="yes">text1</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="a2">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="text" translatable="yes">text2</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
</interface>
Sample of non mono spaced font in the Gui window