Poster | Thread |
redfox
| |
Looking for a simple example of a listview using React GUI Posted on 27-Nov-2019 3:51:14
| | [ #1 ] |
|
|
|
Elite Member |
Joined: 7-Mar-2003 Posts: 2067
From: Canada | | |
|
| Hi all,
I am very new to React. I am trying to find a simple example of how to create a simple listview.
I think this is called a listbrowser in React.
I am attemting to display a list that looks like this:
1 text for line number 1 up to 70 characters wide 2 text for line number 2 up to 70 characters wide 3 text for line number 3 up to 70 characters wide Etc.
My goal is to read each line of text from an external text file, and add it to the list.
Please note: I have already figured out how to do this with MUI using rxMUI. I have also figured out how to do this using the viewlist function in rexxtricks.library.
--- redfox
Last edited by redfox on 27-Nov-2019 at 05:01 AM. Last edited by redfox on 27-Nov-2019 at 04:59 AM.
|
|
Status: Offline |
|
|
Minuous
| |
Re: Looking for a simple example of a listview using React GUI Posted on 27-Nov-2019 13:49:26
| | [ #2 ] |
|
|
|
Regular Member |
Joined: 30-Oct-2004 Posts: 319
From: Unknown | | |
|
| |
Status: Offline |
|
|
Sbaitso
| |
Re: Looking for a simple example of a listview using React GUI Posted on 30-Nov-2019 0:04:15
| | [ #3 ] |
|
|
|
Regular Member |
Joined: 24-May-2003 Posts: 242
From: Unknown | | |
|
| |
Status: Offline |
|
|
jabirulo
| |
Re: Looking for a simple example of a listview using React GUI Posted on 1-Dec-2019 20:16:33
| | [ #4 ] |
|
|
|
Regular Member |
Joined: 20-Jun-2004 Posts: 370
From: Donosti (GUIPUZCOA) | | |
|
| @redfox
datetime_docky,lha uses for its reminders a listbrowser list, sources are included on archive. |
|
Status: Offline |
|
|
redfox
| |
Re: Looking for a simple example of a listview using React GUI Posted on 11-Dec-2019 0:30:23
| | [ #5 ] |
|
|
|
Elite Member |
Joined: 7-Mar-2003 Posts: 2067
From: Canada | | |
|
| @Minuous @Sbaitso @jabirulo
Thanks for your suggestions. Perhaps I will have more time in the new year to go through the examples and documentation. Unfortunately, most of the examples are way more complicated than what I actually need, and some examples do not work on my system.
Unfortunately, I do not know C or C++ or whatever language you guys use for programming.
Perhaps, I need an easy to understand introduction to Amiga programming that explains tags, taglists, tagstems, etc. And explains the options available for each tag. For example, how do you select the monospaced font instead of the proportional spaced font that seems to be used by default for all text inside a window.
I have been using ARexx for several years now, and I have been very happy to find some good helper programs and libraries that allow me to do more complicated stuff as I continue to learn.
I have also used ProAction to help me create a nice React GUI, but I can't find an example with a listbrowser (to view a list containing lines of text).
--- redfox
Last edited by redfox on 11-Dec-2019 at 01:35 AM. Last edited by redfox on 11-Dec-2019 at 12:35 AM.
|
|
Status: Offline |
|
|
Minuous
| |
Re: Looking for a simple example of a listview using React GUI Posted on 11-Dec-2019 2:53:54
| | [ #6 ] |
|
|
|
Regular Member |
Joined: 30-Oct-2004 Posts: 319
From: Unknown | | |
|
| @redfox
You would use the OpenDiskFont() function to get a pointer to the TextAttr structure, then use that with the GA_TextAttr tag when you create the listbrowser gadget.
To fill up the listbrowser, you call AllocListBrowserNode() once for each row and add them into a List with AddTail() or similar, then you use that with the LISTBROWSER_Labels tag when you create the listbrowser gadget.
A list of all tags that are understood is at https://wiki.amigaos.net/amiga/autodocs/listbrowser_gc.doc.txt
An introduction to tags is at https://wiki.amigaos.net/wiki/Tags
I'm not sure how taglists are supported by ARexx, maybe an ARexx programmer can help you with that. Last edited by Minuous on 11-Dec-2019 at 02:59 AM. Last edited by Minuous on 11-Dec-2019 at 02:54 AM.
|
|
Status: Offline |
|
|
broadblues
| |
Re: Looking for a simple example of a listview using React GUI Posted on 12-Dec-2019 12:15:03
| | [ #7 ] |
|
|
|
Amiga Developer Team |
Joined: 20-Jul-2004 Posts: 4446
From: Portsmouth England | | |
|
| |
Status: Offline |
|
|
broadblues
| |
Re: Looking for a simple example of a listview using React GUI Posted on 12-Dec-2019 12:18:53
| | [ #8 ] |
|
|
|
Amiga Developer Team |
Joined: 20-Jul-2004 Posts: 4446
From: Portsmouth England | | |
|
| @Minuous
Quote:
I'm not sure how taglists are supported by ARexx, maybe an ARexx programmer can help you with that.
|
ARExx by itself can't so it application specific. ProAction has two modes either a string
"TAG_ONE,value1,TAG_TWO,value2,TAG_DONE"
or a stem variable
stem.0 = numtags stem.1.tag = TAG_ONE stem.1.value = value
etc.
_________________ BroadBlues On Blues BroadBlues On Amiga Walker Broad |
|
Status: Offline |
|
|