windrobin / winforms-geplugin-control-library

Automatically exported from code.google.com/p/winforms-geplugin-control-library
GNU General Public License v3.0
0 stars 1 forks source link

Checkboxes disappear from GETreeView items when a button is added to the GEToolStrip control #41

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run the sample program
2. Notice checkboxes next to each node in the GETreeView.
3. Using the sample Test Application, enter Design Mode for the dialog
4. Click Edit Items on the GEToolStrip control. Add a button control to the 
tool strip controls and click OK
5. Run the sample program
6. After all of the sample items are loaded, notice that the checkboxes are 
missing from all nodes.
7. Get an original copy of Form1.Designer.cs, and replace the changed version 
of this file. 
8. Run the sample program
9. The checkboxes are back next to the nodes in the GETreeView.

What version of the product are you using? On what operating system?
Using the latest version (Released on April 7, 2011). 
Windows 7

Please provide any additional information below.
I am not very familiar with the library at this point, since I just found it 
today. However, I was able to reproduce this with great regularity once I 
figured out the steps. 

Original issue reported on code.google.com by howlingw...@gmail.com on 12 Apr 2011 at 6:28

Attachments:

GoogleCodeExporter commented 9 years ago
Hi,

Yes this is a bug that appeared with the tri-view check-box support.

It will be fixed in the next commit.

To manually fix please make sure you have the line.

kmlTreeView1.CheckBoxes = true;

In your form designer file or in the constructor for your form.

Thanks,

F.

Original comment by fraser.c...@gmail.com on 12 Apr 2011 at 8:34

GoogleCodeExporter commented 9 years ago
Thanks for your excellent work. Please delete if this is on the wrong place.
It seems that since the last update kmlTreeView1.SelectedNode.Tag returns null. 
I use this to retrieve the type of the node selected (eg "KmlPlacemark"). Is 
there a more efficient way ?
Also if I set
dynamic feature = kmlTreeView1.SelectedNode; 
feature.KmlType is inaccessible due to the protection level of "KmlType"..

Thanks for your time! Please let me know if you need more information.
giorgos

Original comment by gta...@gmail.com on 15 Apr 2011 at 10:34

GoogleCodeExporter commented 9 years ago
@giorgos

- Yes I added a custom 'ApiObject' property to the KmlTreeView, this replaces 
the 'Tag' property as the holder for the api object. Further to this the 
KmlTreeViewNode also has the 'ApiObjectType' property which is the string 
representation of the api type - So you would use:

KmlTreeViewNode node = kmlTreeView1.SelectedNode;
dynamic kmlObject = node.ApiObject;

to get the api object, and:

KmlTreeViewNode node = kmlTreeView1.SelectedNode;
string type = node.ApiObjectType;

To easily get the type ("KmlPlacemark", etc)

Original comment by fraser.c...@gmail.com on 25 Apr 2011 at 11:21

GoogleCodeExporter commented 9 years ago
Hi howling,

I have fixed this issue and plan to update asap.

Thanks,

Fraser

Original comment by fraser.c...@gmail.com on 2 Jun 2011 at 5:11

GoogleCodeExporter commented 9 years ago
Just to note - the reason for the bug is that the 
System.Windows.Forms.ToolStrip (that that GEToolStrip is based on) does not 
support visual inheritance (doh!). This is a known bug, discussed here for 
example:

http://connect.microsoft.com/VisualStudio/feedback/details/552017/visual-inherit
ance-of-a-toolstrip

So, the issue with the KmlTreeView checkboxes is fixed...but you still can't 
use the visual designer to add items to the GEToolStrip. You can however add 
the items via code in your form, it would be nice to support the visual 
designer but it is down to Microsoft on that front I am afraid...

Original comment by fraser.c...@gmail.com on 2 Jun 2011 at 5:17