Combo weirdness !

Linux specific forum
User avatar
hujambo
User
User
Posts: 48
Joined: Wed May 15, 2013 8:26 pm
Location: South Pacific

Combo weirdness !

Post 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:
User avatar
Kukulkan
Addict
Addict
Posts: 1352
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Re: Combo weirdness !

Post 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
User avatar
hujambo
User
User
Posts: 48
Joined: Wed May 15, 2013 8:26 pm
Location: South Pacific

Re: Combo weirdness !

Post 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! :)
User avatar
Kukulkan
Addict
Addict
Posts: 1352
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Re: Combo weirdness !

Post by Kukulkan »

But other GTK software on my system is not affected...
Oma
Enthusiast
Enthusiast
Posts: 312
Joined: Thu Jun 26, 2014 9:17 am
Location: Germany

Re: Combo weirdness !

Post 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
PureBasic 5.4-5.7, Linux: (X/L/K)Ubuntus+Mint - Windows XP (32Bit)
PureBasic Linux-API-Library & Viewer: http://www.chabba.de
#NULL
Addict
Addict
Posts: 1440
Joined: Thu Aug 30, 2007 11:54 pm
Location: right here

Re: Combo weirdness !

Post 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.
Post Reply