StrataFrame Forum

RichTextToolStrip, where is localization?

http://forum.strataframe.net/Topic20134.aspx

By Michel Levy - 10/15/2008

Hi,

I can't find any localization for the RichTextToolStrip... Unsure Is it missing ?

By Trent L. Taylor - 10/16/2008

It looks like this was missed.  I will add it to the list.  Thanks.
By Michel Levy - 10/16/2008

Thanks Trent,

I'll send you french strings (I've translated ToolTipTexts).
Please, don't forget to change the pictures for cmdBold and cmdUnderline, so they must be respectively the letter G and S.

I needed to use it quickly, so I copy/paste from SF sources into my RichTextToolStrip subclass, but I've 2 issues:

1)
I could not modify brwImage.Title for localize it, so I create a new OpenFileDialog, and add a method

Private Sub cmdPicture_click(ByVal sender As System.Object, ByVal e As Windows.Forms.ToolStripItemClickedEventArgs) Handles Me.ItemClicked

If e.ClickedItem.Name = "cmdPicture" Then

Dim rtfControl As System.Windows.Forms.RichTextBox = Me.ActiveRichTextControl
If rtfControl IsNot Nothing Then

Dim PictControl As New System.Windows.Forms.OpenFileDialog
Dim loResult As Windows.Forms.DialogResult
With PictControl
        .Filter =
"Fichiers d'Images(*.bmp, *.jpg , *.png , *.gif) |*.bmp;*.jpg;*.png;*.gif"
        .Title = "Quelle Image ?"
End With

loResult = PictControl.ShowDialog()
If loResult = DialogResult.OK Then
        Me.MLSFInsertImageIntoRTF(rtfControl, PictControl.FileName)
End If

End If

End If

End Sub

But your brwImage pops up after my PictControl, how to prevent it?

2)
Where do you store your tooltiptexts for those 3 buttons corresponding to keystrokes? when disabled, cmdbold shows my tooltip, but when the richtextbox is in editmode, it's your tooltip which is added before the keystroke?
Where did you write it? makes me Crazy !

(please, don't forget I'm beginner in .net Sad )

By Trent L. Taylor - 10/16/2008

Please, don't forget to change the pictures for cmdBold and cmdUnderline, so they must be respectively the letter G and S.

This probably won't happen.  This is a static image, so in this case you will want to supply your own images by inheriting the RTS Toolstrip and the setting the images that you want in code.  You can do that for the translations as we speak as well also so that you do not have to wait on us.

By Trent L. Taylor - 10/16/2008

Where do you store your tooltiptexts for those 3 buttons corresponding to keystrokes? when disabled, cmdbold shows my tooltip, but when the richtextbox is in editmode, it's your tooltip which is added before the keystroke?

It is in the SetToolbarAvailability method on the RichTextToolstrip class.

By Michel Levy - 10/16/2008

  1. This is a static image, so in this case you will want to supply your own images by inheriting the RTS Toolstrip and the setting the images that you want in code.  You can do that for the translations as we speak as well also so that you do not have to wait on us.

    That's what I've done.



  2. It is in the SetToolbarAvailability method on the RichTextToolstrip class.

    OK, but SetToolbarAvailability and _BoldText are Private... so how to do?
By Trent L. Taylor - 10/16/2008

I have added 3 new readonly properties that can be overwritten on the RTT that will allow you to provide your custom localization without being overwritten.  Here is the context it will appear under in the next update:

There are 3 new properties on a RichTextToolstrip that can be overwritten when inherited allowing custom localization to be set without being overwritten.  These are the UnderlineTooltipText, ItalicTooltipText, and BoldTooltipText properties.

I will post another beta build later today or early tomorrow that has this included.

By Michel Levy - 10/16/2008

Thanks a lot!

Did you localize brwImage.Title and brwImage.Filter in this beta?

By Trent L. Taylor - 10/16/2008

I don't guess I know what you mean by brwImage.title and brwImage.Filter.
By Michel Levy - 10/16/2008

in RichTextToolstrip.Designer.vb,


Friend WithEvents brwImage As System.Windows.Forms.OpenFileDialog
Me.brwImage = New System.Windows.Forms.OpenFileDialog

'brwImage
'
Me.brwImage.Filter = "Image Files|*.bmp;*.jpg;*.png;*.gif"
Me.brwImage.Title = "Select Image"


 

highlighted strings need localization

By Trent L. Taylor - 10/17/2008

No, I will add this to the list.
By Michel Levy - 10/17/2008

Thanks Trent (and all SF Team)