Click Here
home features news forums classifieds faqs links search
5630 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

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



You are an anonymous user.
Register Now!
 Skateman:  11 mins ago
 JohnFante:  12 mins ago
 amigakit:  13 mins ago
 eliyahu:  13 mins ago
 Rob:  14 mins ago
 bennymee:  15 mins ago
 lionstorm:  17 mins ago
 Trekiej:  36 mins ago
 Spectre660:  36 mins ago
 OlafS25:  42 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 4:46:08
#1 ]
Super Member
Joined: 7-Mar-2003
Posts: 1661
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 20-Apr-2019 at 12:15 AM.
Last edited by redfox on 20-Apr-2019 at 12:14 AM.
Last edited by redfox on 19-Apr-2019 at 06:17 PM.
Last edited by redfox on 19-Apr-2019 at 06:15 PM.
Last edited by redfox on 19-Apr-2019 at 06:14 PM.
Last edited by redfox on 19-Apr-2019 at 04:50 AM.

 Status: Offline
Profile     Report this post  
redfox 
Re: SOLVED ... How do I display a text file using RxMUI?
Posted on 20-Apr-2019 0:19:38
#2 ]
Super Member
Joined: 7-Mar-2003
Posts: 1661
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 20-Apr-2019 at 12:26 AM.

 Status: Offline
Profile     Report this post  
broadblues 
Re: SOLVED ... How do I display a text file using RxMUI?
Posted on 20-Apr-2019 5:18:59
#3 ]
Amiga Developer Team
Joined: 20-Jul-2004
Posts: 4337
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 2:39:50
#4 ]
Super Member
Joined: 7-Mar-2003
Posts: 1661
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 18:23:44
#5 ]
Super Member
Joined: 7-Mar-2003
Posts: 1661
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 22:34:05
#6 ]
Super Member
Joined: 7-Mar-2003
Posts: 1661
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