[Gambas-user] DirView Control Help

Stefano Palmeri rospolosco at ...152...
Mon Apr 14 12:17:36 CEST 2008


Alle 11:26, lunedì 14 aprile 2008, Demosthenes Koptsis ha scritto:
> Thanks both of you for the reply but the problem remains.
>
> I think I was not fully understandable. I 'll try again.
>
> I set the Root property from design mode to "/". OK
> I set the Current property from code to "/mnt/". OK
>
> The problem is that the DirView control expands two directories at
> running mode.
> The "/home/usr" (the default from design mode) and "/mnt" (this one
> from property Current).

> The question is: How to expand only the "/mnt" directory when the Root
> property is "/" ?
>

I think you can't expand only /mnt/ when the Root
property is "/"

If you need only to expand /mnt
do:

DirView1.Root = "/mnt"

then put a button on the form to see
the root when you need it
or go back to /mnt.

I've attached an example.

Stefano
> I can't set the property Current from design mode. Can I ?
> I think this would solve this problem.
>
> On 4/14/08, Stefano Palmeri <rospolosco at ...152...> wrote:
> > Alle 20:39, domenica 13 aprile 2008, Demosthenes Koptsis ha scritto:
> > > Hi to all.
> > >
> > > I have a DirView control. By default the control lists the contents of
> > > /home/user directory when it is created.
> > > I changed the Root directory but the /home/usr contents are still
> > > listed when the program runs.
> > >
> > > Is it possible to open or close directories by code?  Actually i want
> > > to set Root directory at design time and list the contents only of
> > > this directory at running time.
> > >
> > > Thanks.
> >
> > Try:
> >
> >
> > PUBLIC SUB Form_Open()
> >
> >   DirView1.Current = "/root"
> >
> > END
> >
> > Anyway, you will need root permission to expand the tree.
> >
> > Ciao,
> >
> > Stefano
> >
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> > Don't miss this year's exciting event. There's still time to save $100.
> > Use priority code J8TL2D2.
> > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/ja
> >vaone _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dirview-0.0.1.tar.gz
Type: application/x-tgz
Size: 7822 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20080414/4d321a56/attachment.bin>


More information about the User mailing list