With a slight delay ...
Since you didn't specify anything, I assume that you are
working under gtk3.
It's a general problem under gtk3
that EditorGadgets cannot fall below a certain height.
Since it is of general interest, here is a possibility to patch the min. possible height under gtk3:
Code: Select all
ImportC ""
gtk_scrolled_window_set_min_content_height(*scrolled_window.GtkScrolledWindow, height)
EndImport
; Object constants
#Win_Main = 0
#Edt1 = 0
#Edt2 = 1
#ScrolledWindowChildMinHeight= 40
Global.i gEvent, gQuit
Global.s S1= "This is a multiline text in the EditorGadget which demonstrates the minimal EditorGadget height on gtk3 on your current system."
Global.s S2= "This is a multiline text in the EditorGadget which demonstrates under gtk3 how the minimal EditorGadget height can be patched. I don't know if it works in gtk3.20+! "
Procedure ScrolledWindow_SetMinHeight(Gadget, Height)
Protected *ScrolledWindow.GtkScrolledWindow= gtk_widget_get_parent_(GadgetID(Gadget))
gtk_scrolled_window_set_min_content_height(*ScrolledWindow, Height)
EndProcedure
If OpenWindow(#Win_Main, 0, 0, 600, 200, "Editor - reduce min height on gtk3", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
EditorGadget (#Edt1, 5, 5, 290, 40, #PB_Editor_WordWrap)
AddGadgetItem(#Edt1, -1, S1)
EditorGadget (#Edt2, 305, 5, 290, 40, #PB_Editor_WordWrap)
AddGadgetItem(#Edt2, -1, S2)
ScrolledWindow_SetMinHeight(#Edt2, #ScrolledWindowChildMinHeight)
Repeat
gEvent= WaitWindowEvent()
Select gEvent
Case #PB_Event_CloseWindow
gQuit= #True
EndSelect
Until gQuit
EndIf
If there are no side effects in the future, the team could set it generally when creating an EditorGadget with a more practical value than the Default-setting!
Regards, Charly
ps:
Maybe it works with ListIconGadget/ListViewGadget/... too. I'll give it a shot.
ps2:
Confirmed! This patch works for ListIconGadget/ListViewGadget/... (All Gadgets which are placed by the gtk in a GtkScrolledWindow) too.
If a too large ScrollBarSlider should be a problem then, I would have a solution - please contact me.
Changed procedure name to a more common term, since it can be used for several gadget types.