Page 1 of 1

ListIcon Height

Posted: Sat Jul 23, 2016 9:05 pm
by IdeasVacuum
I have an old app coded in PB5.11 x86. It's not used often so I'm keeping it in old PB, it uses Gonzal's Color lib.

The app has a Panel with a number of tabs. On a couple of these tabs I have used a scroll area gadget and the main gadget on that area is a ListIcon. Here is the issue: The ListIcon height is 1200pix (ScrollArea Height 1800pix). On WindowsXP, that displays as expected, the ListIcon does not need scrollbars. However on Win7 this does not work, no matter what height is given for the ListIcon, the max it is drawn at is approx 1025pix.

I have tried ResizeGadget, no joy - what is the API for ResizeGadget?

Re: ListIcon Height

Posted: Sat Jul 23, 2016 9:11 pm
by RSBasic
IdeasVacuum wrote:what is the API for ResizeGadget?
SetWindowPos_():

Code: Select all

EnableExplicit

If OpenWindow(0, 0, 0, 500, 400, "Window", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  ButtonGadget(1, 10, 10, 100, 20, "Button", 0)
  
  SetWindowPos_(GadgetID(1), 0, 0, 0, 200, 50, #SWP_NOMOVE | #SWP_NOZORDER)
  
  Repeat
    Select WaitWindowEvent()
      Case #PB_Event_CloseWindow
        End
    EndSelect
  ForEver
EndIf

Re: ListIcon Height

Posted: Sun Jul 24, 2016 5:51 am
by RASHAD
With SetWindowPos_() maybe you will need #SWP_FRAMECHANGED flag

Code: Select all

MoveWindow_(GadgetID(gadget),x,y,Width,Height,1)

Re: ListIcon Height

Posted: Tue Jul 26, 2016 5:05 pm
by IdeasVacuum
Thanks for the help guys. The API methods did not improve matters, and that is because deep inside the code I had used a 'magic number' to calc and resize the height of the ListIcon. It is that value that worked perfectly in WinXP but not in Win7. :oops: