Need some ideas

Post Reply
User avatar
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

Need some ideas

Post by Jeff Barnes »

Hi Everybody,

I have an array full of numbers that I plot on the screen.

For easy reference, lets say my array holds 100,000 numbers and I display 1000 at a time. My user can page forward and back through all this data.

I would like to show some kind of "you are here" type bar so they have an idea of where in the data they are.

Can anyone please give me some ideas as to how I would do this?
Thanks,
Jeff Barnes

(FWH 12.01, xHarbour 1.2.1, Bcc582)
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Post by Otto »

Hello Jeff,

I am working on a new datepicker. I would like to select the duration of an appointment with the mouse. The position of the mouse shows a tooltip with the date of the mouseposition.
As I use an array to hold the days of the year I thought maybe this could be of use
for you. Depending on the length of the numbers I see no problem to show 1000 on a screen.
As I use oWnd:say to show the “cells” I don’t have problems with handles and memory.
If this could be of help I send you the sources.
Regrads,
Otto

The idea to such a type of datepicker is from Timm ( Easyreport).
He resolved the task with a browser I try to do the same with
an array.



Image
User avatar
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

Post by Jeff Barnes »

Thanks Otto.

But I think what I need is something like a scrollbar that you see in a browse but horizontal.

Do you know if there is a scrollbar control?
Thanks,
Jeff Barnes

(FWH 12.01, xHarbour 1.2.1, Bcc582)
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Post by Otto »

Jeff, could you post some of the numbers to see how you would like to plot them.
Regards,
Otto
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Post by Otto »

Jeff, if you define the Window with

DEFINE WINDOW oWndPlan TITLE "Kalender" ;
HSCROLL ;
FROM 5, 5 TO 24, 98
you have the scrollbar.

Then you can use these methods:
oWindPlan:oHScroll():SetRange(1,oWindPlan:nHorzRes())
oWindPlan:oHScroll():SetPos(oWindPlan:nHorzRes()/2)

oWindPlan:oHScroll():SetPos(nPos:=nPos+7));
here you can use 100 or 1000 ...

Regards,
Otto

Image
User avatar
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

Post by Jeff Barnes »

Otto,

Here is a screen shot. I already have the data plotted ... I just need a way to let the user know where they are in the record (array).


www.can-soft.net/dl/Sample.bmp
Thanks,
Jeff Barnes

(FWH 12.01, xHarbour 1.2.1, Bcc582)
User avatar
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

Post by Jeff Barnes »

Thanks Otto.

Using your suggestions I am almost there.

Is it possible to have the scrollbar somewhere else on the screen (other than at the bottom)?
Thanks,
Jeff Barnes

(FWH 12.01, xHarbour 1.2.1, Bcc582)
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Array-positions

Post by ukoenig »

Hello Jeff,

just have a look at my new toppic
maybe it helps.

Regards

Uwe
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Jeff,

> Is it possible to have the scrollbar somewhere else on the screen (other than at the bottom)?

Yes. You can create a scrollbar control anywhere.

Please review samples\TestScrl.prg. Use the clause HORIZONTAL to create it horizontal instead of vertical.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

Post by Jeff Barnes »

Got it working :-)

Is there an updated look to the scrollbar?
Thanks,
Jeff Barnes

(FWH 12.01, xHarbour 1.2.1, Bcc582)
Post Reply