39 lines
1.0 KiB
Elixir
Raw Normal View History

2016-11-25 00:33:18 -07:00
-------------------------------------------------------------------------
--# Text markup for labels (also works for tooltips, etc)
-------------------------------------------------------------------------
include GtkEngine.e
include resources/test5.e -- this file contains the marked-up text
constant win = create(GtkWindow,"border=5,size=500x80,position=1,$destroy=Quit")
constant panel = create(GtkBox,"orientation=1,margin_left=20,margin_right=20")
add(win,panel)
constant lbl1 = create(GtkLabel)
set(lbl1,"markup",docs)
add(panel,lbl1)
add(panel,create(GtkSeparator))
constant lbl2 = create(GtkLabel)
set(lbl2,"markup",text)
add(panel,lbl2)
add(panel,create(GtkSeparator,"margin-top=10,margin-bottom=10"))
constant lbl3 = create(GtkLabel,"line_wrap=1,font=8")
set(lbl3,"text","Source:\n" & text)
add(panel,lbl3)
constant btn1 = create(GtkButton,"gtk-quit","Quit")
constant box = create(GtkButtonBox,"margin_top=10")
add(box,btn1)
pack_end(panel,box)
show_all(win)
main()