Click Here
home features news forums classifieds faqs links search
6071 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
12 crawler(s) on-line.
 115 guest(s) on-line.
 0 member(s) on-line.



You are an anonymous user.
Register Now!
 Troels:  39 mins ago
 Gunnar:  54 mins ago
 Rob:  59 mins ago
 zipper:  1 hr 22 mins ago
 amigakit:  2 hrs 19 mins ago
 OneTimer1:  2 hrs 24 mins ago
 NutsAboutAmiga:  2 hrs 28 mins ago
 kolla:  2 hrs 40 mins ago
 Comi:  3 hrs 10 mins ago
 vox:  3 hrs 56 mins ago

/  Forum Index
   /  Amiga General Chat
      /  SOLVED ... How do I display a text file using RxMUI?
Register To Post

PosterThread
redfox 
SOLVED ... How do I display a text file using RxMUI?
Posted on 19-Apr-2019 3:46:08
#1 ]
Elite Member
Joined: 7-Mar-2003
Posts: 2064
From: Canada

Sorry, the program lines below do not show the spaces at the beginning of lines between do command and end command.

I am building a program using RxMUI. I want to display a text file in a window. The text file is external to the program, for example a readme file. So far, I have figured out how to open a window with a nice menu, but I can't figure out how to actually display the text in the window. The RxMUI examples I found do not cover this topic. Most of them use text that is internal to the example program. So I don't know if I can use the simple window I created or if I have to define a listview or something more complicated.

The following examples open the text file, read a line, display it in the window and repeat until the end of the file. The first example uses MicroRexx. The second example uses rexxbgui.library.


Using MicroRexx, for example, this is very easy... there is an NPRINT command that prints the text in the window.

call open(file,"ram:readme",READ)
do until eof(file)
text = readln(file) /* read a line of text */
'NPRINT' w '"'text'"' /* add quotes and display in window */
end
call close(file)


Using rexxbgui.library, for example, it is a little harder ... I added the text to a listview in the window.

call open(file,"ram:readme",READ)
do until eof(file)
text = readln(file)
call bguilistvaddentry(obj.listv,,text)
end
call close(file)


Any help would be greatly appreciated.

---
redfox


Last edited by redfox on 19-Apr-2019 at 11:15 PM.
Last edited by redfox on 19-Apr-2019 at 11:14 PM.
Last edited by redfox on 19-Apr-2019 at 05:17 PM.
Last edited by redfox on 19-Apr-2019 at 05:15 PM.
Last edited by redfox on 19-Apr-2019 at 05:14 PM.
Last edited by redfox on 19-Apr-2019 at 03:50 AM.

 Status: Offline
Profile     Report this post  
redfox 
Re: SOLVED ... How do I display a text file using RxMUI?
Posted on 19-Apr-2019 23:19:38
#2 ]
Elite Member
Joined: 7-Mar-2003
Posts: 2064
From: Canada

SOLVED .... I found an example using NListview class and the program showed how to add lines of text to the listview.

Working fine, except that the font is a variable-width font, where the letters and spacings have different widths. I need a mono-spaced font, such as DejaVu Sans Mono/15.

---
redfox



Last edited by redfox on 19-Apr-2019 at 11:26 PM.

 Status: Offline
Profile     Report this post  
broadblues 
Re: SOLVED ... How do I display a text file using RxMUI?
Posted on 20-Apr-2019 4:18:59
#3 ]
Amiga Developer Team
Joined: 20-Jul-2004
Posts: 4446
From: Portsmouth England

@redfox

Guesswork here as I've never used rxMUI but try setting the Font attribute to fixed

http://alfie.altervista.org/rxmui/rxmuidoc/main.html

Also todisplay text easily, use the texteditor.mcc class in readonly mode.

_________________
BroadBlues On Blues BroadBlues On Amiga Walker Broad

 Status: Offline
Profile     Report this post  
redfox 
Re: SOLVED ... How do I display a text file using RxMUI?
Posted on 21-Apr-2019 1:39:50
#4 ]
Elite Member
Joined: 7-Mar-2003
Posts: 2064
From: Canada

@broadblues

Thanks Andy. I'll try those suggestions.

---
redfox

 Status: Offline
Profile     Report this post  
redfox 
Re: SOLVED ... How do I display a text file using RxMUI?
Posted on 23-Apr-2019 17:23:44
#5 ]
Elite Member
Joined: 7-Mar-2003
Posts: 2064
From: Canada

@broadblues

Thanks so much. Using the texteditor.mcc class in readonly mode with fixed width font.

---
redfox

 Status: Offline
Profile     Report this post  
redfox 
Re: SOLVED ... How do I display a text file using RxMUI?
Posted on 24-Apr-2019 21:34:05
#6 ]
Elite Member
Joined: 7-Mar-2003
Posts: 2064
From: Canada

@broadblues

Thanks again Andy. Today I figured out how to set the Font attribute to fixed for NListview class.

Thanks,
redfox

 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