StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Localizing of MaintenanceFormToolStripExpand / Collapse
Author
Message
Posted 08/13/2006 12:48:08 AM
StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: Forum Members
Last Login: 08/14/2006 7:50:59 AM
Posts: 1, Visits: 2
I am evaluating StrataFrame and making some experiences with the tutorial and help.

Concerning the concept of localizing I have the following question:

How to translate the text, tooltip etc. of the MaintenanceFormToolStrip with the message editor?

Is there a alternate way, to achieve this?

Many Thanks

_p_
Post #2176
Posted 08/13/2006 8:17:28 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 2 days ago @ 5:02:56 PM
Posts: 2,682, Visits: 1,882
If there is not a Localization Key property on the control, you can pogrammatically set the text to a localized value by retrieving it through the MicroFour.StrataFrame.UI.Localization.RetrieveTextValue(Key) method.  So, in the load of the form you can set the property like this:

private void Form_Load(object sender, EventArgs e)
{
    this.MaintenanceFormToolstrip1.Item(0).Text = Localization.RetrieveTextValue("NewText");
    this.MaintenanceFormToolstrip1.Item(0).ToolTip =
        Localization.RetrieveTextValue("NewToolTip");
}

You can also subclass any control and code the localization into that.


www.bungie.net
Post #2177
Posted 08/13/2006 9:17:42 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 4:58:13 AM
Posts: 4,379, Visits: 4,421
We have some developers create a sealed class that has a method that accepts and sets the items on a Maintenance Form Toolstrip.  This way you do not have to "re-invent the wheel" every time need to localize the bar.  Below is an example class definition.

Public NotInheritable Class AppBasics

    ''' <summary>
    ''' Seals the class
    ''' </summary>
    ''' <remarks></remarks>
    Private Sub New()

    End Sub

    ''' <summary>
    ''' Sets the maintenance form toolbar buttons localization items
    ''' </summary>
    ''' <param name="MyBar"></param>
    ''' <remarks></remarks>
    Public Shared Sub SetToolstripTextValues(ByVal MyBar As MicroFour.StrataFrame.UI.Windows.Forms.MaintenanceFormToolStrip)
        MyBar.Items(0).Text = MicroFour.StrataFrame.UI.Localization.RetrieveTextValue(
"MyNewToolbarKey")

        ' Set the remaining bar items

    End Sub

End Class

Post #2178
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 8:51am

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.125. 10 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.