Code: Select all
;run and you will see the items are listed and the last items are visible
If OpenWindow(0, 0, 0, 322, 150, "EditorGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
EditorGadget(0, 8, 8, 306, 133)
For a = 0 To 15
AddGadgetItem(0, a, "Line "+Str(a))
Next
Range.NSRange\location = Len(GetGadgetText(0))
CocoaMessage(0, GadgetID(0), "scrollRangeToVisible:@", @Range)
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf