Re: [Gambas-user] TreeView item focus

2009-08-23 Thread Ron_1st
On Saturday 22 August 2009, Jean-Yves F. Barbier wrote:
 Fabien Bodard a écrit :
  you can do that by hand !
  
  no ?
  
  in TreeView_Expand()
 
 May be, I'm gonna dig this possibility (I don't already know all about
 widgets, so I still miss some skills)
 
 But @ first glance I don't know what could change as I'll trigger this
 event each time I expand a branch, good, 

no?
Lets assume the treeview show directories. On the side there is a listview.
If it is a file browser like konqueror/nautilus then you have a list of files.
When you click on the directory { treeview_click() } the listview get the 
file list for it.
When you click on the plus/minus { treeview_expand() } you want to expand the 
treeview.

Here the treeview_expand() event can read the directory and add found 
directories to the treeview. 
Else you must fill the treeview with ALL directories on your system and take 
the risk the directory does not exists at the moment you expand this directory. 
Also you miss the add directories after you did fill initial the treeview.

Now you want to move a file in the listview to other place. 
You scroll down in the treeview expand some directory and there expand onother. 
Now you can drag/drop from the listview a selected file to the last expanded in 
the treeview.
That is the good reason to not make the expanded directory the selected one.

 BUT if I'm still stuck with  treeview root as current leaf... how would I 
 know where I am?
 
  Last.Item.Selected=true
 
 This one is impossible, precisely because if I only expand branches
 without selecting any item, focus' stuck on the treeview root.

???
As far I know Last.Item is the one from the expand event and should work.
(treeview_Selected() event?)

  
  On some case we don't want to change the item selected so by
  default it is better like that
 
 Having the choice would be great... 
 (some cases or almost any cases? I'm pretty sure it is 'some'.)
 
 JY

Therefore if those events as _expand and _click did not exist you had to fill 
the
treeview and listview with all directories and files on your system at opening
of the form. With more the 200 directories and over 1 files it is done in 
less
then 1 nano second. Just for a filemanager example.

Best regards,

Ron_1st

-- 

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] TreeView item focus

2009-08-23 Thread Jean-Yves F. Barbier
Fabien Bodard a écrit :
 you can do that by hand !
 
 no ?
 
 in TreeView_Expand()
 
 Last.Item.Selected=true
 
Ok Fabien, thanks it is working :) 

but I didn't find any reference to that in the documentation: even a grep
didn't return anything:(
grep -R Last.Item /usr/share/gambas2/help/help/* = nada
grep -Rw Last /usr/share/gambas2/help/help/* =
   /usr/share/gambas2/help/help/changes.html:Gambas Documentation - Last Changes
   /usr/share/gambas2/help/help/changes.html:Last Changes
   /usr/share/gambas2/help/help/help.html:a href=changes.htmlLast 
Changes/anbsp;nbsp;nbsp;
   /usr/share/gambas2/help/help/lang/stat.html:liLast modification time.
 
I can learn quite fast, but not out of nowhere.

JY
-- 
You will be dead within a year.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] TreeView item focus

2009-08-23 Thread Laurent Carlier
Le dimanche 23 août 2009 14:24:35 Jean-Yves F. Barbier, vous avez écrit :
 Fabien Bodard a écrit :
  you can do that by hand !
 
  no ?
 
  in TreeView_Expand()
 
  Last.Item.Selected=true

 Ok Fabien, thanks it is working :)

 but I didn't find any reference to that in the documentation: even a grep
 didn't return anything:(
 grep -R Last.Item /usr/share/gambas2/help/help/* = nada
 grep -Rw Last /usr/share/gambas2/help/help/* =
/usr/share/gambas2/help/help/changes.html:Gambas Documentation - Last
 Changes /usr/share/gambas2/help/help/changes.html:Last Changes
/usr/share/gambas2/help/help/help.html:a href=changes.htmlLast
 Changes/anbsp;nbsp;nbsp;
 /usr/share/gambas2/help/help/lang/stat.html:liLast modification time.

 I can learn quite fast, but not out of nowhere.

 JY

Perhaps here:
http://64.128.110.55/help/lang/last

Returns a reference to the object that raised the last event

++

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] TreeView item focus

2009-08-23 Thread Jean-Yves F. Barbier
Laurent Carlier a écrit :
...
 I can learn quite fast, but not out of nowhere.

 JY
 
 Perhaps here:
 http://64.128.110.55/help/lang/last
 
 Returns a reference to the object that raised the last event

yaah: on the site, but NOT existant into the package's docs :(

-- 

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] TreeView item focus

2009-08-23 Thread Ron_1st
On Sunday 23 August 2009, Jean-Yves F. Barbier wrote:
 Fabien Bodard a écrit :
  you can do that by hand !
  
  no ?
  
  in TreeView_Expand()
  
  Last.Item.Selected=true
  
 Ok Fabien, thanks it is working :) 
 
 but I didn't find any reference to that in the documentation: even a grep
 didn't return anything:(
 grep -R Last.Item /usr/share/gambas2/help/help/* = nada
 grep -Rw Last   /usr/share/gambas2/help/help/* =
/usr/share/gambas2/help/help/changes.html:Gambas Documentation - Last 
 Changes
/usr/share/gambas2/help/help/changes.html:Last Changes
/usr/share/gambas2/help/help/help.html:a href=changes.htmlLast 
 Changes/anbsp;nbsp;nbsp;
/usr/share/gambas2/help/help/lang/stat.html:liLast modification time.
  
 I can learn quite fast, but not out of nowhere.
 
 JY

http://gambasdoc.org/help?en

1)See Language:

2)see Components for ? exactly

Find all on the same page for gb.qt treeview:
http://gambasdoc.org/help/comp/gb.qt/treeview
http://gambasdoc.org/help/comp/gb.qt/treeview/item

http://gambasdoc.org/help/comp/gb.qt/treeview/.select
http://gambasdoc.org/help/comp/gb.qt/treeview/.expand

http://gambasdoc.org/help/comp/gb.qt/control/expand

Last is not a component but part of the Language 

2)see Language Index
http://gambasdoc.org/help/lang
At the index by name:
http://gambasdoc.org/help/lang/last


A child can fly the plain :)

I go read about grep -Rw now. :(


Best regards,

Ron_1st

-- 

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] TreeView item focus

2009-08-22 Thread Jean-Yves F. Barbier
Hi list,

Is it normal that expanding a branch in TreeView doesn't give focus to the root 
item of this branch (it stays on TreeView root), as this prevents forbidding an 
expand under conditions?

JY
-- 


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] TreeView item focus

2009-08-22 Thread Benoît Minisini
 Hi list,

 Is it normal that expanding a branch in TreeView doesn't give focus to the
 root item of this branch (it stays on TreeView root), as this prevents
 forbidding an expand under conditions?

 JY

Expanding a branch should not change the focused item. Why ?

And please remind us if you use gb.qt or gb.gtk, as their behaviour may not be 
the same even if it should.

Regards,

-- 
Benoît

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] TreeView item focus

2009-08-22 Thread Doriano Blengino
Jean-Yves F. Barbier ha scritto:
 Hi list,

 Is it normal that expanding a branch in TreeView doesn't give focus to the 
 root 
 item of this branch (it stays on TreeView root), as this prevents forbidding 
 an 
 expand under conditions?

 JY
   
The only thing I can say is that when I first deployed DirTreeView (or 
something like that - a treeview for directories), I had to rewrite it 
from scratch. It was too different from what I needed.

It is not difficult - take the source of gambas as a starting point, and 
do the things you want to do; I suspect that if you don't do so, you 
will loose a lot of time, and gain a lot of anger.

Salut,

-- 
Doriano Blengino

Listen twice before you speak.
This is why we have two ears, but only one mouth.


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] TreeView item focus

2009-08-22 Thread Jean-Yves F. Barbier
Benoît Minisini a écrit :
 Hi list,

 Is it normal that expanding a branch in TreeView doesn't give focus to the
 root item of this branch (it stays on TreeView root), as this prevents
 forbidding an expand under conditions?

 JY
 
 Expanding a branch should not change the focused item. Why ?

Yes, this is the question: I don't understand why the developed branch' father
don't become the Current item.

 And please remind us if you use gb.qt or gb.gtk, as their behaviour may not 
 be 
 the same even if it should.

oops, forgot one more time :(

2.15.2 regular Debian sid package
gb.qt

JY
-- 
If they sent one man to the moon, why can't they send them all?

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] TreeView item focus

2009-08-22 Thread Jean-Yves F. Barbier
Doriano Blengino a écrit :
 Jean-Yves F. Barbier ha scritto:
 Hi list,

 Is it normal that expanding a branch in TreeView doesn't give focus to the 
 root 
 item of this branch (it stays on TreeView root), as this prevents forbidding 
 an 
 expand under conditions?

 JY
   
 The only thing I can say is that when I first deployed DirTreeView (or 
 something like that - a treeview for directories), I had to rewrite it 
 from scratch. It was too different from what I needed.
 
 It is not difficult - take the source of gambas as a starting point, and 
 do the things you want to do; I suspect that if you don't do so, you 
 will loose a lot of time, and gain a lot of anger.

No, this is not a reasonable  option Doriano, because that could mean I 
modify it each time it don't fit my needs - while making the application 
totally non-compatible with regular Gambas package(s).
(not to mention that I'm not sure I'm skilled enough to do so.)

The goal is to install Gambas stable branch and my application final dot;
otherwise it will very swiftly turn into a real mess.

JY
-- 
The SAME WAVE keeps coming in and COLLAPSING like a rayon MUU-MUU ...

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] TreeView item focus

2009-08-22 Thread Doriano Blengino
Doriano Blengino ha scritto:
 Jean-Yves F. Barbier ha scritto:
   
 Hi list,

 Is it normal that expanding a branch in TreeView doesn't give focus to the 
 root 
 item of this branch (it stays on TreeView root), as this prevents forbidding 
 an 
 expand under conditions?

 JY
   
 
 The only thing I can say is that when I first deployed DirTreeView (or 
 something like that - a treeview for directories), I had to rewrite it 
 from scratch. It was too different from what I needed.

 It is not difficult - take the source of gambas as a starting point, and 
 do the things you want to do; I suspect that if you don't do so, you 
 will loose a lot of time, and gain a lot of anger.

 Salut,

   
ROLLBACK

forget the words above. I was watching sport @ Berlin - did'nt read 
carefully the message. Sorry.

Regards,

-- 
Doriano Blengino

Listen twice before you speak.
This is why we have two ears, but only one mouth.


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] TreeView item focus

2009-08-22 Thread Fabien Bodard
you can do that by hand !

no ?

in TreeView_Expand()

Last.Item.Selected=true



On some case we don't want to change the item selected so by
default it is better like that




2009/8/22 Jean-Yves F. Barbier 12u...@gmail.com:
 Benoît Minisini a écrit :
 Hi list,

 Is it normal that expanding a branch in TreeView doesn't give focus to the
 root item of this branch (it stays on TreeView root), as this prevents
 forbidding an expand under conditions?

 JY

 Expanding a branch should not change the focused item. Why ?

 Yes, this is the question: I don't understand why the developed branch' father
 don't become the Current item.

 And please remind us if you use gb.qt or gb.gtk, as their behaviour may not 
 be
 the same even if it should.

 oops, forgot one more time :(

 2.15.2 regular Debian sid package
 gb.qt

 JY
 --
 If they sent one man to the moon, why can't they send them all?

 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
 trial. Simplify your report design, integration and deployment - and focus on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] TreeView item focus

2009-08-22 Thread Jean-Yves F. Barbier
Doriano Blengino a écrit :
 Doriano Blengino ha scritto:
 Jean-Yves F. Barbier ha scritto:
   
 Hi list,

 Is it normal that expanding a branch in TreeView doesn't give focus to the 
 root 
 item of this branch (it stays on TreeView root), as this prevents 
 forbidding an 
 expand under conditions?

 JY
   
 
 The only thing I can say is that when I first deployed DirTreeView (or 
 something like that - a treeview for directories), I had to rewrite it 
 from scratch. It was too different from what I needed.

 It is not difficult - take the source of gambas as a starting point, and 
 do the things you want to do; I suspect that if you don't do so, you 
 will loose a lot of time, and gain a lot of anger.

 Salut,

   
 ROLLBACK

Funny: my 1st application is a PostgreSQL groups/users management made easy :)
 
 forget the words above. I was watching sport @ Berlin - did'nt read 
 carefully the message. Sorry.

Haaach ich weisse: weitsen, schnaps, spezial und bretzel, und so weiter ;-)
 
jy
-- 
You are not dead yet.  But watch for further reports.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] TreeView item focus

2009-08-22 Thread Jean-Yves F. Barbier
Fabien Bodard a écrit :
 you can do that by hand !
 
 no ?
 
 in TreeView_Expand()

May be, I'm gonna dig this possibility (I don't already know all about
widgets, so I still miss some skills)

But @ first glance I don't know what could change as I'll trigger this
event each time I expand a branch, good, BUT if I'm still stuck with 
treeview root as current leaf... how would I know where I am?

 Last.Item.Selected=true

This one is impossible, precisely because if I only expand branches
without selecting any item, focus' stuck on the treeview root.
 
 On some case we don't want to change the item selected so by
 default it is better like that

Having the choice would be great... 
(some cases or almost any cases? I'm pretty sure it is 'some'.)

JY
-- 
Ya'll hear about the geometer who went to the beach to catch some
rays and became a tangent ?

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user