Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


no visual affect on Tree.selectedNode


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-02-2007, 05:28 PM
specci48's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Germany
Posts: 638
Default no visual affect on Tree.selectedNode

This is a question to the .Net experts.

If I select a node by tabbing on the display (or clicking on a node on the desktop) the node ist selected AND the node gets colored to show the selection.
If I select a node by coding Tree.selectedNode = ... the node is selected but NOT colored to show the selection. Why?

I want the user to be able to move a selected node up or down in a treeview. First, the user selects a node by tabbing. The node gets colored and everything is ok.
Since there is no build in function to move up or down a node, I delete the node and insert it again one position up or down.
Then I automatically select the moved node in the program so the user could press the up or down button without tabbing on the node again. But my program driven selection is not visible to the user ... so he has to guess which node will move if he presses up or down.

Any solutions available?


specci48
Reply With Quote
  #2 (permalink)  
Old 09-02-2007, 06:01 PM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Greece
Posts: 353
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Hi there specci48,

I thing that to see the selection, TreeView should have the focus.
After Up or DOWN button click, move the focus again to TreeView.

I hope I helped.

Regards
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
  #3 (permalink)  
Old 09-02-2007, 06:34 PM
specci48's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Germany
Posts: 638
Default

Hi dzt,

sorry but a treeview has no focus function...


specci48
Reply With Quote
  #4 (permalink)  
Old 09-02-2007, 06:51 PM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Greece
Posts: 353
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
  #5 (permalink)  
Old 09-02-2007, 08:36 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,134
Default

The focus method will be added to this control (and other control-libraries as well) as part of the ControlsEx library.
This should fix the problem you've encountered.
Reply With Quote
  #6 (permalink)  
Old 09-03-2007, 09:53 AM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Greece
Posts: 353
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Hi,

I took it personally.

Quote:
The focus method will be added to this control (and other control-libraries as well) as part of the ControlsEx library.
This should fix the problem you've encountered.
In then meantime, two workarounds.

1. If in the form dispose every other (except the TreeView) focus-able control after selecting a TreeView node, then the focus returns to TreeView. After this you can add the controls again at runtime (AddButton etc)

2. You can use for "UP NODE" and "DOWN NODE" instead of buttons something focus-unable, for example a label, and in that way TreeView won't loose the focus. Look my Clickable Label example here dzEventsMagic at dzEventsMagic thread (post #8).
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
  #7 (permalink)  
Old 09-03-2007, 05:43 PM
specci48's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Germany
Posts: 638
Default

Hi dzt,

I testet workaround 2. with the LinkLabel library and it worked.

Quote:
Originally Posted by Erel View Post
The focus method will be added to this control (and other control-libraries as well) as part of the ControlsEx library.
This should fix the problem you've encountered.
Sounds nice. But what is the ControlsEx library? When will it be released? (OK, everytime the same questions...)


specci48
Reply With Quote
  #8 (permalink)  
Old 09-03-2007, 06:39 PM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Greece
Posts: 353
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Quote:
Sounds nice. But what is the ControlsEx library?
Have a look at this thread TreeView.Control

Quote:
When will it be released? (OK, everytime the same questions...)
Maybe it could be someone to stay all night just outside Erel's home and make terrible noise, so he couldn't sleep and stay focused to B4PPC development!

Maybe I'll try it myself as I am quite near to Israel.
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
  #9 (permalink)  
Old 09-03-2007, 07:01 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,134
Default


It will be released soon (1-2 weeks).
It is just a library that packs: ScrollBar, TrackBar, TreeView, ProgressBar, TabControl and ToolBar libraries.
Reply With Quote
  #10 (permalink)  
Old 09-07-2007, 12:59 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,134
Default

You can now download the new library and use the Focus method.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Tree View - Help Cableguy Questions & Help Needed 18 07-19-2008 01:43 PM
Another problem with tree view RandomCoder Questions & Help Needed 8 02-28-2008 12:36 PM
Registry to Tree View willisgt Questions & Help Needed 0 02-20-2008 05:17 PM
Basic4PPC vs Visual Studio J12345T Questions & Help Needed 25 07-09-2007 01:29 AM
Listview.dll con Visual Studio 2005 Filippo Italian Forum 15 07-08-2007 10:57 AM


All times are GMT. The time now is 05:21 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0