Click Here
home features news forums classifieds faqs links search
5728 members 
Amiga Q&A /  Free for All /  Emulation /  Gaming / (Latest Posts)
Login

Nickname

Password

Lost Password?

Don't have an account yet?
Register now!

Support Amigaworld.net
Your support is needed and is appreciated as Amigaworld.net is primarily dependent upon the support of its users.
Donate

Menu
Main sections
Home
Features
News
Forums
Classifieds
Links
Downloads
Extras
OS4 Zone
IRC Network
AmigaWorld Radio
Newsfeed
Top Members
Amiga Dealers
Information
About Us
FAQs
Advertise
Polls
Terms of Service
Search

IRC Channel
Server: irc.amigaworld.net
Ports: 1024,5555, 6665-6669
SSL port: 6697
Channel: #Amigaworld
Channel Policy and Guidelines

Who's Online
0 crawler(s) on-line.
 3 guest(s) on-line.
 0 member(s) on-line.



You are an anonymous user.
Register Now!
 samo79:  47 mins ago
 AlexC:  1 hr 26 mins ago
 agami:  2 hrs 10 mins ago
 DiscreetFX:  2 hrs 54 mins ago
 DWolfman:  3 hrs 11 mins ago
 Trekiej:  3 hrs 34 mins ago
 WeiXing3D:  4 hrs 6 mins ago
 MEGA_RJ_MICAL:  4 hrs 22 mins ago
 coldacid:  5 hrs 6 mins ago
 eliyahu:  5 hrs 20 mins ago

/  Forum Index
   /  Amiga General Chat
      /  Looking for a simple example of a listview using React GUI
Register To Post

PosterThread
redfox 
Looking for a simple example of a listview using React GUI
Posted on 27-Nov-2019 3:51:14
#1 ]
Super Member
Joined: 7-Mar-2003
Posts: 1717
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
Profile     Report this post  
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

It is pretty straightforward. There is an example in http://aminet.net/package/dev/gui/ClassAct2Demo and you could also look at the code of open source ReAction applications like http://aminet.net/package/util/misc/ReportPlus .

Last edited by Minuous on 27-Nov-2019 at 01:51 PM.
Last edited by Minuous on 27-Nov-2019 at 01:50 PM.
Last edited by Minuous on 27-Nov-2019 at 01:50 PM.

 Status: Offline
Profile     Report this post  
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

@redfox

Here are a few resources to assist with development using ReAction:

https://wiki.amigaos.net/wiki/ReAction

http://www.os4depot.net/index.php?function=showfile&file=document/development/reactionguide.lha

https://wiki.amigaos.net/wiki/AmiWest_Lesson_4 - Video of this lesson - https://youtu.be/6bHYHJu9-7o

Further development assistance can also be found at http://www.os4coding.net and http://forum.hyperion-entertainment.com/

 Status: Offline
Profile     Report this post  
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: 344
From: Donosti (GUIPUZCOA)

@redfox

datetime_docky,lha uses for its reminders a listbrowser list, sources are included on archive.

 Status: Offline
Profile     Report this post  
redfox 
Re: Looking for a simple example of a listview using React GUI
Posted on 11-Dec-2019 0:30:23
#5 ]
Super Member
Joined: 7-Mar-2003
Posts: 1717
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
Profile     Report this post  
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
Profile     Report this post  
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: 4407
From: Portsmouth England

@redfox

There is listbrowser example in the SketchBlock demo archive on os4depot.net

http://os4depot.net/?function=showfile&file=graphics/edit/sketchblock.lha

The file you need is

SketchBlock/Rexx/PrefsEditor.rexx

It's not a 'simple' example but does handle creating and free the list nodes with the ProAction helper functions.

_________________
BroadBlues On Blues BroadBlues On Amiga Walker Broad

 Status: Offline
Profile     Report this post  
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: 4407
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
Profile     Report this post  

[ home ][ about us ][ privacy ] [ forums ][ classifieds ] [ links ][ news archive ] [ link to us ][ user account ]
Copyright (C) 2000 - 2019 Amigaworld.net.
Amigaworld.net was originally founded by David Doyle