luis wrote:I would like the ability to change the order of the files in the project window, maybe through drag and drop or a simpler move up/move down couple of buttons.
Drag and drop items to ListIconGadget(), do quite easily.
I hope that this will be implemented in IDE.
Code: Select all
If OpenWindow(0, 100, 100, 300, 200, "ListIcon Example", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ListIconGadget(0, 5, 5, 290, 190, "Name", 270, #PB_ListIcon_FullRowSelect|#PB_ListIcon_AlwaysShowSelection)
For i=1 To 10
AddGadgetItem(0, -1, Str(i))
Next i
EnableGadgetDrop(0, #PB_Drop_Private, #PB_Drag_Move, 2)
Repeat
Event = WaitWindowEvent()
If Event = #PB_Event_Gadget And EventType() = #PB_EventType_DragStart
Select EventGadget()
Case 0
sItem = GetGadgetState( 0)
If sItem >=0
DragPrivate( 2, #PB_Drag_Move )
EndIf
EndSelect
ElseIf Event = #PB_Event_GadgetDrop
If EventGadget()=0
tItem = GetGadgetState( 0 )
If sItem <> tItem And tItem>=0 And sItem>=0
If tItem<CountGadgetItems(0)-1
NItem=tItem+1
Else
NItem=tItem-1
EndIf
sText.s = GetGadgetItemText( 0, sItem )
RemoveGadgetItem(0, sItem)
AddGadgetItem(0, tItem, sText)
SetGadgetState(0, tItem)
EndIf
EndIf
EndIf
Until Event = #PB_Event_CloseWindow
EndIf