Skip to content

Commit

Permalink
Add WRAP_WIDTH, WRAP_MODE tags to cell_properties_text, supported sin…
Browse files Browse the repository at this point in the history
…ce gtk 2.8 (#146)
  • Loading branch information
garrigue committed Dec 18, 2021
1 parent 3a15011 commit 8db82bb
Show file tree
Hide file tree
Showing 9 changed files with 1,400 additions and 1,695 deletions.
4 changes: 4 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
LablGTK changes log

2021.12.18 [Jacques]
* Add WRAP_WIDTH, WRAP_MODE tags to cell_properties_text (#146)
[Nathan Guermond]

2021.12.03 [Jacques]
* Fix #141: lablgtk2 runs OCaml code inside blocking section
(#142) [Bart Jacobs]
Expand Down
6 changes: 5 additions & 1 deletion examples/tree.ml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,12 @@ let main () =
let window = GWindow.window () in
window#connect#destroy ~callback:GMain.quit;
let view = GTree.view ~model ~packing:window#add () in
(* Allow wrapping for title field *)
let col = GTree.view_column ~title:"Title" ()
~renderer:(GTree.cell_renderer_text[], ["text",title]) in
~renderer:(GTree.cell_renderer_text[`WRAP_WIDTH 150;
`WRAP_MODE `WORD_CHAR],
["text",title]) in
col#set_resizable true;
view#append_column col;
let col = GTree.view_column ~title:"Author" ()
~renderer:(GTree.cell_renderer_text[], ["text",author]) in
Expand Down
Loading

0 comments on commit 8db82bb

Please sign in to comment.