Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TreeView Node Editing
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
01035306
Message ID:
01036050
Vues:
14
Your sample worked fine on my pc. I'll look further into the app.

>Kevin,
>
>That's odd. It works for me. And it works whether or not LabelEdit is set to 0 - Automatic or 1 - Manual. When I call the StartLabelEdit(), it puts the box around the node and highlights all the text. I'm using Microsoft's Tree View ActiveX Control - Version 6.0 (SP6) in VFP 9. Here's a little sample that show's it working on my system. You may get different results if you don't have the same version of the Tree View control and you may have to change the value of the OleClass:
>
>LOCAL loForm as frmTree
>
>loForm = NEWOBJECT('frmTree')
>loForm.Show(1)
>
>loForm = null
>
>
>DEFINE CLASS frmTree as Form
>	Caption = 'TreeView Test'
>	Width = 320
>	Height = 360
>	AutoCenter = .t.
>
>	ADD OBJECT oTree as OleControl WITH ;
>		OleClass = 'MSComctlLib.TreeCtrl.2', ;
>		Left = 10, ;
>		Top = 10, ;
>		Width = 300, ;
>		Height = 300
>
>	ADD OBJECT cmdEdit as CommandButton WITH ;
>		Caption = 'Edit', ;
>		Height = 30, ;
>		Width = 100, ;
>		Left = 110, ;
>		Top = 320
>
>	PROCEDURE Init
>		WITH this.oTree
>			.Nodes.Add(, 0, 'n1', 'The First Node')
>			.Nodes.Add(, 0, 'n2', 'The Second Node')
>			.Nodes.Add(, 0, 'n3', 'The Third Node')
>		ENDWITH
>	ENDPROC
>
>	PROCEDURE cmdEdit.Click
>		thisform.oTree.StartLabelEdit()
>	ENDPROC
>ENDDEFINE
>
>HTH,
>Chad
>
>>This has no effect. The label on the selected node does
>>not enter edit mode.
>>
>>>Kevin,
>>>
>>>
>>>thisform.oTree.StartLabelEdit()
>>>
>>>
>>>HTH,
>>>Chad
>>>
>>>>How do I put a treeview node into text edit mode programmatically?
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform