Troubles with GoText (ComboBox Style)

I have some troubles with the GoText, more precisely with the GoTextEditorStyle.ComboBox.

I have a simple document with a GoSimpleNode in which there is a ComboBox like this :

GoText gt = new GoText(); gt.EditorStyle = GoTextEditorStyle.ComboBox; gt.Editable = true; ArrayList lst = new ArrayList(); lst.Add("Text1"); lst.Add("Text2"); lst.Add("Text3"); lst.Add("Text4"); gt.DropDownList = true; gt.Choices = lst; gt.Text = (string)lst[0];
My node design looks like :
GoGroup m_Group = new GoGroup(); Pen borderPen = new Pen(System.Drawing.Color.Black); GoRoundedRectangle m_Border = new GoRoundedRectangle(); ... m_Group.Add(this.m_Border);

m_Group.Editable = true;

GoListGroup m_ImageTextGroup = new ListGroup();
m_ImageTextGroup.Alignment = Middle;
m_ImageTextGroup.Orientation = Orientation.Vertical;
m_ImageTextGroup.Add( [ a GoImage ] );
m_ImageTextGroup.Add( [ the node declared before ] );

m_Border.Size = m_Group.Size;

this.Icon = m_Group;

I don't find what's going wrong ? Thanks for your help...

Well, the code you have to create the GoTextEditorStyle.ComboBox GoText works, I tested that. I don’t see where you are dropping “gt” into the node.

Is the node itself set to "Editable = true" ?

I affect m_Group to this.Icon and then my GoSimpleNode.Editable is set to true (this.Editable = true)…

My GoView has the following properties :
AllowCopy = false;
AllowDelete = false;
AllowDragOut = false;
AllowDrop = true;
AllowEdit = true;
AllowInsert = false;
AllowKey = false;
AllowLink = false;
AllowMove = false;
AllowReshape = true;
AllowResize = true;
AllowSelect = false;

That’s my result… without ComboBox Style !

The combo box doesn’t show all the time, just when the GoText is in “edit mode”… when you click on it. Is that working?

unfortunately it’s not working… I don’t know why…

If you want the GoText to be editable when the user clicks on it, you need to set GoText.Editable to true, not GoNode.Editable.

Thanks Walter, but if you read my first post, you will see that I’ve set editable property to true for the GoText, GoGroup and GoSimpleNode…

Send the code for the whole node to email “godiagram”, I’ll take a look.

email “godiagram” ?

godiagram at this domain. I try to avoid putting the whole email address in the forum to avoid spam.

Mail sent.