Infragistics Home

Infragistics Forums

Infragistics community online discussions.
Welcome to Infragistics Forums Sign in | FAQ
in Search

TextBox Tool in a UltraToolBar, how to retreive the "text"

Last post 06-11-2008 11:17 by figment. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 06-10-2008 10:58

    • figment
    • Not Ranked
    • Joined on 06-10-2008
    • Points 53

    TextBox Tool in a UltraToolBar, how to retreive the "text"

    Hi,

     I've put a TextBox in a Ultratoolbar, and I want to retrieve the text in this textbox when we click on a button in the ultratoolbar...

    I don't find the command

     

    Thanks for your help

     Best Regards, Didier

    • Post Points: 20
  • 06-10-2008 13:57 In reply to

    Re: TextBox Tool in a UltraToolBar, how to retreive the "text"

    The following should give you the text inside of the TextBoxTool.  You will need the key for the toolbar that it resides on along with the key for the textboxtool. 

    ((TextBoxTool)this.ultraToolbarsManager1.Toolbars["toolbarkey"].Tools["textboxtoolkey"]).Text

    • Post Points: 38
  • 06-11-2008 3:01 In reply to

    • figment
    • Not Ranked
    • Joined on 06-10-2008
    • Points 53

    Re: TextBox Tool in a UltraToolBar, how to retreive the "text"

    Hi,

    sorry, I'm new in .net ;-), I don't understrand how to access the textboxtool function in the ToolClick sub

    here a simple test code :

         Private Sub UltraToolbarsManager1_ToolClick(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinToolbars.ToolClickEventArgs) Handles UltraToolbarsManager1.ToolClick
            If e.Tool.Key = "New" Then
                MsgBox("Test")
            End If
            If e.Tool.Key = "BT_Search" Then
                MsgBox("Search : " & 'here I want to add the text of the textbox with the key tb_search in the tool bar
            End If
        End Sub

     

    • Post Points: 20
  • 06-11-2008 9:36 In reply to

    Re: TextBox Tool in a UltraToolBar, how to retreive the "text"

    Answer

    Here is the equivalent code in VB.NET.  (I am using index positions instead of keys but you can use either)

    MessageBox.Show(CType(Me.UltraToolbarsManager1.Toolbars(0).Tools(0), TextBoxTool).Text)

    • Post Points: 50
  • 06-11-2008 11:17 In reply to

    • figment
    • Not Ranked
    • Joined on 06-10-2008
    • Points 53

    Re: TextBox Tool in a UltraToolBar, how to retreive the "text"

    Answer

    Great ! Working

     

    Thanks for the Support, Didier

    • Post Points: 5
Page 1 of 1 (5 items)
Powered by Community Server (Commercial Edition), by Telligent Systems