We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Fontdialog code not working: want to change diagram text node

Thread ID:

Created:

Updated:

Platform:

Replies:

99118 Apr 28,2011 09:59 PM UTC May 2,2011 09:39 AM UTC Windows Forms 2
loading
Tags: Diagram
Administrator [Syncfusion]
Asked On April 28, 2011 09:59 PM UTC

I could not figure out how to use the xp bar and had to go with a tool bar. As such, I could not add the font combobox to the toolbar at design time. I went, therefore, with a button. On the buttons click event, I want to open a fontdialog and have the user choose a font and its size to apply to a text node. I cannot get it to work.

This code not only shows the dialog box twice, but the font and its size is not applied to the text. I don't know where I'm going wrong. I've tried it with several different combinations of code. Please help.

Private Sub btnFontDialog_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFontDialog.Click
Dim strFamilyName As String = FontDialog1.ShowDialog.ToString
If FontDialog1.ShowDialog() <> DialogResult.Cancel Then
Me.Diagram1.Controller.TextEditor.FamilyName = strFamilyName
End If
End Sub
Thank you.



Administrator [Syncfusion]
Replied On May 1, 2011 02:31 AM UTC

figured it out. Geese. no answers to my questions.


Pandi Murugan A [Syncfusion]
Replied On May 2, 2011 09:39 AM UTC

Hi White,

We are sorry for the delay in getting back to you.

Here is the sample for XPTool bar.

<http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=ManiFrameBarManager365002270.zip>

Here is how you can populate the menu, Add the items in the Customize dialog and Drag and Drop to the toolbar.
<http://help.syncfusion.com/ug_84/User%20Interface/Windows%20Forms/Tools/default.htm?turl=Documents%2Faddingandfillingthexptoolbar.htm>

Here is the code snippet for changing the TextEditor font name through font dialog.

If FontDialog1.ShowDialog(diagram1) = DialogResult.OK Then
diagram1.Controller.TextEditor.FamilyName = FontDialog1.Font.FontFamily.Name
End If


Please let me know if you have any concerns.

Regards,
Pandi Murugan A




CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;