TextGadget with wrapping

Linux specific forum
Inf0Byt3
PureBasic Fanatic
PureBasic Fanatic
Posts: 2236
Joined: Fri Dec 09, 2005 12:15 pm
Location: Elbonia

TextGadget with wrapping

Post by Inf0Byt3 »

As you probably know the text gadget doesn't wrap the text by itself, like on Windows. Here's a snippet for enabling it :).

Code: Select all

 Procedure TextGadgetEx(Gad,X,Y,W,H,Text.s,Flags=0)
 
   TextGadget(Gad,X,Y,W,H,Text.s,Flags)
   gtk_label_set_justify_(GadgetID(Gad), #GTK_JUSTIFY_LEFT);
   gtk_label_set_line_wrap_(GadgetID(Gad),1)
   gtk_widget_set_size_request_(GadgetID(Gad),GadgetWidth(Gad),GadgetHeight(Gad))
 
 EndProcedure
You can call it instead of TextGadget().
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)