; Module/File: Button_LineFeed.pb ; Function: The ButtonGadget API variant for #PB_Button_MultiLine - Linux gtk2/gtk3 ; Author: Omi ; Date: Oct. 28, 2016 ; Version: 0.1 ; Target Compiler: PureBasic 5.22/5.31/5.40 ; Target OS: Linux: (X/K/L)ubuntu, Mint, 32/64, Ascii/Uni ;-------------------------------------------------------------- ;Workaround for Gtk3-bug in PB5.50 ... If OpenWindow(0, 0, 0, 222, 230, "ButtonGadgets", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) ButtonGadget(0, 10, 10, 200, 26, "Centered Button") ButtonGadget(1, 10, 40, 200, 26, "Left Button", #PB_Button_Left) ButtonGadget(2, 10, 70, 200, 26, "Right Button", #PB_Button_Right) ButtonGadget(3, 10, 100, 200, 60, "Multiline Button (longer text is automatically wrapped)");, #PB_Button_MultiLine) ButtonGadget(4, 10, 165, 200, 60, "Multiline Button" + #LF$ + "(this text is manually" + #LF$ + "wrapped w/o Flag Or API.") gtk_label_set_line_wrap_(gtk_bin_get_child_(GadgetID(3)), #True); in Gtk3 set this again after a SetGadgetText(3, Text$) ! Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow EndIf ; IDE Options = PureBasic 5.45 LTS (Linux - x86) ; CursorPosition = 3 ; EnableUnicode ; EnableXP