scrolling

scrolling

Postby Otto » Tue Dec 20, 2005 8:13 pm

I would like to write many lines of text into a window and then to scroll.
Is scrolling automatically or do I have to programm?
Thanks in advance
Otto


static oWnd

function Main()

DEFINE WINDOW oWnd from 1,1 TO 30,60 TITLE "Kontoauszug";
VSCROLL;
MENU bldMenu()

ACTIVATE WINDOW oWnd

return nil

function bldMenu()
LOCAL oMenu
set exclusive off
MENU oMenu
MENUITEM "Start" ;
ACTION f_code()
ENDMENU

return oMenu

func f_code
LOCAL nRow1 := 0
local hVert := 25
local planfont
Local I:=0
local oSay


DEFINE FONT planFont NAME "Arial" SIZE 6,22

FOR I := 1 TO 100
nRow1 := nRow1 + hVert
* Line( nTop nLeft nBottom nRight
oWnd:say( nRow1+2, 1, "TEST",255,16777215,planFont,.T.)
NEXT

RETURN NIL
User avatar
Otto
 
Posts: 6338
Joined: Fri Oct 07, 2005 7:07 pm

Postby Antonio Linares » Tue Dec 20, 2005 8:41 pm

Otto,

Yes, you have yo perform the scrolling yourself. You may review wbrowse.prg source code as it also scrolls.

Another way is to use a GET multiline that will scroll automatically though it may be limited into the amount of text to contain.

Another possibility is to show a browse and then use a DBF where each record is a text line, so to add a text line, you add a record, fill the field, and refresh the browse.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Otto » Tue Dec 20, 2005 9:05 pm

Thank you for your answer. As I want to use different fonts I think that multiget and wbrowse are not a solution.

Don't you have a working example?

Thanks again
Otto
User avatar
Otto
 
Posts: 6338
Joined: Fri Oct 07, 2005 7:07 pm

Postby Enrico Maria Giordano » Tue Dec 20, 2005 9:56 pm

Try the RichEdit control.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Otto » Tue Dec 20, 2005 10:11 pm

That’s what I thought first. But how can you prevent that someone chances the text and I need the position of the mouse.
User avatar
Otto
 
Posts: 6338
Joined: Fri Oct 07, 2005 7:07 pm

Postby Antonio Linares » Tue Dec 20, 2005 10:31 pm

Otto,

You may disable the richedit control, so it does not accept any input.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Enrico Maria Giordano » Wed Dec 21, 2005 7:57 am

Otto wrote:That’s what I thought first. But how can you prevent that someone chances the text and I need the position of the mouse.


Try READONLY clause. For mouse position try GetCol() and GetRow() methods.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Otto » Wed Dec 21, 2005 10:00 am

Thanks Antonio, thanks Enrico,

As I need better display possibilities for my billing-software I tried several options.

Now I think I found a good solution.

This is only a test if it could work but you see how I would like to do it.
Maybe someone does like it and joins development for this “invoice-browser”

Regards
Otto


Here is a link for a demo: www.atzwanger.com/invoice
User avatar
Otto
 
Posts: 6338
Joined: Fri Oct 07, 2005 7:07 pm


Return to FiveWin for CA-Clipper

Who is online

Users browsing this forum: No registered users and 10 guests