Page 1 of 1

Combo weirdness !

Posted: Wed Feb 15, 2017 8:37 pm
by hujambo
Hi guys, I'm having combo gadget issues with Linux, where if there are too many items for the window size I get a combo with a load of blank lines at the start.

Mint 18 Sarah 5.44 LTS (Linux - x64)

See below...

Image

Code: Select all

  If OpenWindow(0, 0, 0, 350, 200, "ComboBoxTest", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    
    ComboBoxGadget(1, 10, 10, 200, 21)
    For a = 1 To 30
        AddGadgetItem(1, -1,"ComboBox item " + Str(a))
      Next
    SetGadgetState(1, 2)    ; set (beginning with 0) the third item as active one

    Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
  EndIf
Is this one of those Gtk weird things or does anyone know a fix? Other than keeping the list short that is :lol:

Re: Combo weirdness !

Posted: Thu Feb 16, 2017 10:23 am
by Kukulkan
I can confirm this weird behavior with PB 5.44 LTS (x64) on my Kubuntu 16.04. Really weird. And if you use the scroll-wheel of your mouse it becomes even worse...

Kukulkan

Re: Combo weirdness !

Posted: Thu Feb 16, 2017 7:31 pm
by hujambo
Thanks Kukulkan. From what I can make out it's a GDK issue rather than a Purebasic one. As you say, use a mouse wheel and you can go on for miles of white lines :) then scroll up and they all disappear.... cool... not! :)

Re: Combo weirdness !

Posted: Fri Feb 17, 2017 7:59 am
by Kukulkan
But other GTK software on my system is not affected...

Re: Combo weirdness !

Posted: Sat Feb 18, 2017 9:15 am
by Oma
Confirmed!
Yes, and the behavior depends on where the window is placed vertically.
Its a mix of trying to use a max. screen height for the popup and centering the previous selection.

Regards, Charly

Re: Combo weirdness !

Posted: Sat Feb 18, 2017 1:55 pm
by #NULL
looks familiar to me. it seems to be an old issue:
https://bugs.launchpad.net/ubuntu/+sour ... bug/388633
Therefore, the most efficient behavior for an option menu is opening it so that the currently selected item is immediately under the pointer, because that results in least mouse movement and eye movement to access the previous/next items
but i agree it just looks wrong.