Is there a equivalent GetGadgetItemText() for EditorGadget?

Just starting out? Need help? Post your questions and find answers here.
User avatar
T4r4ntul4
Posts: 132
Joined: Wed May 21, 2014 1:57 pm
Location: Netherlands
Contact:

Is there a equivalent GetGadgetItemText() for EditorGadget?

Post by T4r4ntul4 »

Hi all,

This has me puzzled somewhat. What i try to do is the following:

I have some data in this form: (with spaces between them)

row1 item1 name1 etc1 etc1 etc1
row2 item2 name2 etc2 etc2 etc2
row3 item3 name3 etc3 etc3 etc3
row4 item4 name4 etc4 etc4 etc4

I want to paste them in a EditorGadget (or some other gadget) to read the data row for row. So that i can process the data row for row and put it in a structure.

In PureBasic you can do GetGadgetItemText() in the EditorGadget to retrieve the text of 1 row of choice.
Is there some equivalent for SpiderBasic?

Or is there something else i can do to read it out per line?

Any help/other solution is appreciated.
User avatar
Peter
Posts: 1086
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: Is there a equivalent GetGadgetItemText() for EditorGadg

Post by Peter »

Code: Select all

Procedure.s GetGadgetItemTextEx(Gadget, Position)
  
  ProcedureReturn StringField(GetGadgetText(Gadget), Position + 1, #LF$)
  
EndProcedure

If OpenWindow(0, 0, 0, 322, 150, "EditorGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  EditorGadget(0, 8, 8, 306, 133)
  SetGadgetText(0, "This is a multiline text to edit" + #LF$ +
                   "in the EditorGadget()." + #LF$ +
                   "Third line")
  
  Debug GetGadgetItemTextEx(0, 1)
  
EndIf
;)
User avatar
T4r4ntul4
Posts: 132
Joined: Wed May 21, 2014 1:57 pm
Location: Netherlands
Contact:

Re: Is there a equivalent GetGadgetItemText() for EditorGadg

Post by T4r4ntul4 »

Thank you again!
Post Reply