Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic _propertyGrid text update from program (Read 2294 times)
kpdamico@aol.com
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 10
Joined: May 9th, 2008
_propertyGrid text update from program
May 9th, 2008 at 4:40pm
Print Post  
I am attempting to update the text field in the _propertyGrid on the FlowCharter sample program.
I change the text in the node but cannot reach the text field in the properties table on the right hand side of the screen.

Does any one have a little snippet for doing this?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: _propertyGrid text update from program
Reply #1 - May 9th, 2008 at 7:15pm
Print Post  
In order to display just those three properties, the sample defines a NodeProps class and assigns its instance to PropertyGrid.SelectedObject, instead of the actual selected ShapeNode. So you must update the NodeProps.Text property too, or simply assign ShapeNodes to the PropertyGrid, instead of going through the intermediary object.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
kpdamico@aol.com
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 10
Joined: May 9th, 2008
Re: _propertyGrid text update from program
Reply #2 - May 9th, 2008 at 9:15pm
Print Post  
OK - can you give me a VB snippet that will store
"XXX" in that text property window? Roll Eyes
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: _propertyGrid text update from program
Reply #3 - May 12th, 2008 at 9:26am
Print Post  
Dim node As ShapeNode = CType(_doc.ActiveItem, ShapeNode)
node.Text = "XXX"
_selected.Text = node.Text
_propertyGrid.Refresh()

"_selected" is the NodeProps instance that FlowCharter assigns to the PropertyGrid.SelectedObject property. So you just set its Text property along with the ShapeNode's Text. Note that _selected is Nothing when there isn't any selected diagram item.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
kpdamico@aol.com
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 10
Joined: May 9th, 2008
Re: _propertyGrid text update from program
Reply #4 - May 12th, 2008 at 2:55pm
Print Post  
Stoyan,

Thanks, I'll give the snippet a spin.

Ken
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint