Page 1 of 1

EditorGadget & AddGadgetItem()

Posted: Tue Jun 07, 2016 11:27 pm
by falsam
This code does not work. No result.

Code: Select all

If OpenWindow(0, 0, 0, 322, 150, "EditorGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    EditorGadget(0, 8, 8, 306, 133)
    For a = 0 To 5
      AddGadgetItem(0, a, "Line "+Str(a))
    Next
  EndIf
My workaround

Code: Select all

If OpenWindow(0, 0, 0, 322, 150, "EditorGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  EditorGadget(0, 8, 8, 306, 133)
  
  For a = 0 To 5
    buffer$ = GetGadgetText(0) + "Line "+Str(a) + #CRLF$
    SetGadgetText(0, buffer$)
  Next
EndIf

Re: EditorGadget & AddGadgetItem()

Posted: Thu Jul 28, 2016 9:59 am
by Fred
AddGadgetItem() is not supported on the EditorGadget() in SpiderBasic.