ComboBoxGadget Height Ignored?

Everything else that doesn't fall into one of the other PB categories.
ebs
Enthusiast
Enthusiast
Posts: 561
Joined: Fri Apr 25, 2003 11:08 pm

ComboBoxGadget Height Ignored?

Post by ebs »

I just noticed that the ComboBoxGadget seems to ignore the "Height" parameter.
I created one with a height of 300 and filled it with about 150 items. When I drop it down,
it's about twice the specified height, and it extends past the bottom of the window.
Does Windows adjust the ComboBox height based on the number of items in it?
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2148
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Post by Andre »

Can you post a (short) example code, please ?
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
ebs
Enthusiast
Enthusiast
Posts: 561
Joined: Fri Apr 25, 2003 11:08 pm

Post by ebs »

André,

Here's a simple example. The ComboBoxGadget height is specified as 100, but it drops down to a much larger size. I think I have (part of) the answer: Windows XP. The comboxbox height is correct if I do not use the "Enable XP skin support" compiler option. If I do use it, the ComboBox height is much bigger than it should be. So it has something to do with XP skin support, right?

Eric

Code: Select all

;- fill year combobox
Procedure FillYears()
  ClearGadgetItemList(2)
  
  For Year.l = 1930 To Year(Date())
    AddGadgetItem(2, -1, Str(Year))
  Next
EndProcedure

;- open Add Album window
Procedure.l Window_AddAlbum()
  If OpenWindow(0,0,0,400,365,#PB_Window_ScreenCentered|#PB_Window_SystemMenu|#PB_Window_Invisible,"Add Album to Database")
    If CreateGadgetList(WindowID())
      SetGadgetFont(#PB_Default,LoadFont(1,"Arial", 8)) 
      ComboBoxGadget(2,310,60,55,100)
      FillYears()
      SetGadgetState(2,0)
      HideWindow(0,#False)
      ProcedureReturn WindowID()
    EndIf
  EndIf
EndProcedure

;- main event loop
If Window_AddAlbum() 
  Repeat
    EventID.l = WaitWindowEvent()
  Until EventID = #PB_Event_CloseWindow
EndIf
End
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2148
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Post by Andre »

So it has something to do with XP skin support, right?
I think so. It seems like a WinXP "feature"... :D
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
merendo
Enthusiast
Enthusiast
Posts: 449
Joined: Sat Apr 26, 2003 7:24 pm
Location: Germany
Contact:

Post by merendo »

Since I use Windows Operating System, my programmes have no longer bugs... Just hidden features...
Under a non-WinXP os it works fine, both with enabled or disabled WinXP skin support.
Post Reply