Groups > dBase > dBase programming > Re: A bigger list




A bigger list

A bigger list
Wed, 9 Apr 2008 13:47:19 +0200
To all:

When I want  to list a series of files or folders I use
a grid or a listbox.

That lists me, whatever the height of the screen and the font size
allows
.
I would like to list more... I mean to use the full screen
so that ould give me like 10 times more listing.

What would be the best aproach to this ?

Emilio

Post Reply
Re: A bigger list
Wed, 09 Apr 2008 13:57:25 -040
plaace only you display control on a window i.e your listbox or grid (its better
you use a listbox), then set the anchor or the control to 6. i.e container. for
the form, make sure
mdi =- false
windowstate = 2

Post Reply
Re: A bigger list
Wed, 09 Apr 2008 23:25:31 +020
On Wed, 09 Apr 2008 13:47:19 +0200, evilaro
<"buzon[NO]"@evilfoto.es>  
wrote:

> To all:
>
> When I want  to list a series of files or folders I use
> a grid or a listbox.
>
> That lists me, whatever the height of the screen and the font size
> allows
> .
> I would like to list more... I mean to use the full screen
> so that ould give me like 10 times more listing.
>
> What would be the best aproach to this ?

"Best" is a subjective call but what about writing out the file names
to a  
table that has many fields.  I've used 5 in the example code below but  
this could be whatever you liked.  When the table is dataLinked to a grid  
it displays 5 colums.

I've simply listed the files from left to right in each row to have  
something to show but it would be only a little more work to list them  
 from top to bottom in each column if this is what is needed.

Mervyn


**** Start of example code *****

set safety off
if not file ("evdirtest.dbf")
    create table evdirtest(dir1 char(20), dir2 char(20), dir3 char(20),;
                           dir4 char(20),dir5 char(20))
endif
use evdirtest exclusive
zap
aEvdir = new array()
adir(aEvdir,"c:\duflp\*.*")
for n=0 to (aEvdir.size/5)-1 step 5
     append blank
     for n1 = 1 to 5
         cmd =  "replace dir"+n1+" with
aEvdir["+(n+n1)+",1]"
         if n+n1 <= (aEvdir.size/5)
            &cmd
         endif
     next
next

** END HEADER -- do not remove this line
//
// Generated on 2008/04/09
//
parameter bModal
local f
f = new _emiliodirForm()
if (bModal)
    f.mdi = false // ensure not MDI
    f.readModal()
else
    f.open()
endif

class _emiliodirForm of FORM
    with (this)
       onOpen = class::FORM_ONOPEN
       height = 28.8636
       left = 1.0
       top = 1.5909
       width = 146.8571
       text = ""
    endwith

    this.EVDIRTEST1 = new QUERY()
    this.EVDIRTEST1.parent = this
    with (this.EVDIRTEST1)
       left = 27.4286
       top = 1.0455
       sql = 'select * from "evdirtest.DBF"'
       active = true
    endwith

    this.GRID1 = new GRID(this)
    with (this.GRID1)
       dataLink = form.evdirtest1.rowset
       hasColumnHeadings = false
       height = 25.0909
       left = 4.0
       top = 1.0455
       width = 142.2857
    endwith

    this.rowset = this.evdirtest1.rowset

    function form_onOpen

       return

endclass

Post Reply
Re: A bigger list
Wed, 9 Apr 2008 23:52:10 +0200
Agbeniga David:

I am a little bit lost on this.

If I understand properly, the way to see more fields is to reduce the
size of the font. Of course this would do)
But to see 50 times more the letters will be so small and difficult to read.

Maybe I have not understood this properly.
Thanks for the help.

Emilio


"Agbeniga David" <agbenigadavid@yahoo.com> escribió en el
mensaje 
news:cnuLrsmmIHA.468@news-server...
> plaace only you display control on a window i.e your listbox or grid (its 
> better you use a listbox), then set the anchor or the control to 6. i.e 
> container. for the form, make sure
> mdi =- false
> windowstate = 2
>
> then you can add an event to dynamically reduce the size of the font of 
> the listbox. that will act like a zoom in and out. you can use the 
> onrightmouse down event or whatever. or attach a popup menu to the listbox

> that has zoom in and out too dynamically change your fontsize. this should

> help 

Post Reply
Re: A bigger list
Wed, 9 Apr 2008 23:55:20 +0200
Mervyn:

Your demo, does not fill the grid
but I feel the idea is a good one.

You mean you make a table with as many equal size
fields, and you fill them from the table in the order you
want, in this way you can use the whole screen
so you could have easily 100 fields instead of 20-30

Thanks a lot for the idea.

Emilio

"Mervyn Bick" <invalid@invalid.invalid> escribió en el mensaje 
news:op.t9c4gtbt380wm4@mervyn1...
On Wed, 09 Apr 2008 13:47:19 +0200, evilaro
<"buzon[NO]"@evilfoto.es>
wrote:

> To all:
>
> When I want  to list a series of files or folders I use
> a grid or a listbox.
>
> That lists me, whatever the height of the screen and the font size
> allows
> .
> I would like to list more... I mean to use the full screen
> so that ould give me like 10 times more listing.
>
> What would be the best aproach to this ?

"Best" is a subjective call but what about writing out the file names
to a
table that has many fields.  I've used 5 in the example code below but
this could be whatever you liked.  When the table is dataLinked to a grid
it displays 5 colums.

I've simply listed the files from left to right in each row to have
something to show but it would be only a little more work to list them
 from top to bottom in each column if this is what is needed.

Mervyn


**** Start of example code *****

set safety off
if not file ("evdirtest.dbf")
    create table evdirtest(dir1 char(20), dir2 char(20), dir3 char(20),;
                           dir4 char(20),dir5 char(20))
endif
use evdirtest exclusive
zap
aEvdir = new array()
adir(aEvdir,"c:\duflp\*.*")
for n=0 to (aEvdir.size/5)-1 step 5
     append blank
     for n1 = 1 to 5
         cmd =  "replace dir"+n1+" with
aEvdir["+(n+n1)+",1]"
         if n+n1 <= (aEvdir.size/5)
            &cmd
         endif
     next
next

** END HEADER -- do not remove this line
//
// Generated on 2008/04/09
//
parameter bModal
local f
f = new _emiliodirForm()
if (bModal)
    f.mdi = false // ensure not MDI
    f.readModal()
else
    f.open()
endif

class _emiliodirForm of FORM
    with (this)
       onOpen = class::FORM_ONOPEN
       height = 28.8636
       left = 1.0
       top = 1.5909
       width = 146.8571
       text = ""
    endwith

    this.EVDIRTEST1 = new QUERY()
    this.EVDIRTEST1.parent = this
    with (this.EVDIRTEST1)
       left = 27.4286
       top = 1.0455
       sql = 'select * from "evdirtest.DBF"'
       active = true
    endwith

    this.GRID1 = new GRID(this)
    with (this.GRID1)
       dataLink = form.evdirtest1.rowset
       hasColumnHeadings = false
       height = 25.0909
       left = 4.0
       top = 1.0455
       width = 142.2857
    endwith

    this.rowset = this.evdirtest1.rowset

    function form_onOpen

       return

endclass

****** End of example code ******* 

Post Reply
<< Previous 1 2 Next >>
( Page 1 of 2 )
about | contact