EditorGadget & AddGadgetItem()

Just starting out? Need help? Post your questions and find answers here.
falsam
Posts: 286
Joined: Mon May 05, 2014 9:49 pm
Location: France
Contact:

EditorGadget & AddGadgetItem()

Post 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

➽ Windows 11 - jdk-11.0.2 - SB 3.00 - Android 15
https://falsam.com

Sorry for my poor english
Fred
Site Admin
Posts: 1821
Joined: Mon Feb 24, 2014 10:51 am

Re: EditorGadget & AddGadgetItem()

Post by Fred »

AddGadgetItem() is not supported on the EditorGadget() in SpiderBasic.
Post Reply