; Module/File: Editor_HScrollbarAtTop.pb ; Function: EditorGadget: set the hor. scrollbar to the top - Linux ; Author: Omi ; Date: Sep. 15, 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 ;-------------------------------------------------------------- ;works also for ListIconGadget, ListViewGadget, TreeGadget, ExplorerListGadget, ExplorerTreeGadget EnableExplicit ;Window Variablen #Win_Main= 0 #Edt = 0 Global.l gEvent, gQuit Global *gScrolledwindow.GtkScrolledWindow Global.s gS= "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. " + "At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. " Procedure CreateWindow_Main() If OpenWindow(#Win_Main, 200, 200, 300, 100, "H-Scrollbar @ top", #PB_Window_SystemMenu) EditorGadget(#Edt, 5, 5, 290, 90) SetGadgetText(#Edt, gS) *gScrolledwindow= gtk_widget_get_parent_(GadgetID(#Edt)) gtk_scrolled_window_set_placement_(*gScrolledwindow, #GTK_CORNER_BOTTOM_LEFT) EndIf EndProcedure CreateWindow_Main() Repeat gEvent= WaitWindowEvent() Select gEvent Case #PB_Event_CloseWindow gQuit= #True EndSelect Until gQuit ; IDE Options = PureBasic 5.45 LTS (Linux - x86) ; CursorPosition = 3 ; Folding = - ; EnableUnicode ; EnableXP