[4 beta 11] Splittergadget child size changes ++
Posted: Tue Apr 25, 2006 7:07 pm
As #PB_Splitter_SecondFixed is passed one would expect the second gadget not to change width. As it is it is very clumsy to use an extra variable to preserve the width through the call to the splitter gadget.
When the ListIconGadget is resized the icons' positions are not updated. First run the program as it is. Then uncomment the commented line and run the program again. Resize it to be very narrow (like the first program). The icons layout does not change, and there seems to be no way to make it change (I tried hiding it and showing it).
Code: Select all
OpenWindow(0, 0, 0, 512, 384, "", #PB_Window_ScreenCentered | #PB_Window_SystemMenu)
CreateGadgetList(WindowID(0))
ButtonGadget(1, 10, 10, 22, 25, "22")
ButtonGadget(2, 10, 10, 88, 25, "88")
SplitterGadget(3, 10, 10, 100, 25, 2, 1, #PB_Splitter_Vertical | #PB_Splitter_SecondFixed)
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
Break
EndSelect
ForEver
When the ListIconGadget is resized the icons' positions are not updated. First run the program as it is. Then uncomment the commented line and run the program again. Resize it to be very narrow (like the first program). The icons layout does not change, and there seems to be no way to make it change (I tried hiding it and showing it).
Code: Select all
OpenWindow(0, 0, 0, 512, 384, "", #PB_Window_ScreenCentered | #PB_Window_SystemMenu| #PB_Window_SizeGadget)
CreateGadgetList(WindowID(0))
ListIconGadget(0, 10, 10, 100, 364, "", 100)
ChangeListIconGadgetDisplay(0, 0)
dir.s = "c:\documents and settings\trond\mine dokumenter\mine bilder\"
If ExamineDirectory(0, dir, "*.bmp")
While NextDirectoryEntry(0)
Img = LoadImage(-1, dir + DirectoryEntryName(0))
ResizeImage(Img, 32, 32, #PB_Image_Raw)
AddGadgetItem(0, -1, DirectoryEntryName(0), ImageID(Img))
Wend
EndIf
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
Break
Case #PB_Event_SizeWindow
;ResizeGadget(0, 10, 10, WindowWidth(0)-20, WindowHeight(0)-20)
EndSelect
ForEver