Print Page | Close Window

React to input into a EditControl

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=1913
Printed Date: 02 July 2024 at 6:28pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: React to input into a EditControl
Posted By: finn
Subject: React to input into a EditControl
Date Posted: 04 March 2005 at 8:41am

Hello!

I've added a EditControl to my Toolbar. Now I want to read out the text of that control, if you pressed on the Return Key.

I hope someone can help me...

Yours,

Finn!

PS.: Sorry for my bad English. I'm from Germany and I can't speak and write English very well!

 




Replies:
Posted By: Devin Dazzle
Date Posted: 05 March 2005 at 6:55am

When you press the Enter key the Execut event is fired. You would then be able to get the text doing something like this in the Execute event:

Dim cBarControl As CommandBarControl
Set cBarControl = CmdBars.FindControl(, CONTROL_ID_OF_EDITCONTROL)
If Not cBarControl Is Nothing Then
   MsgBox cBarControl.Text
End If

Replace CONTROL_ID_OF_EDITCONTROL with the ID of the edit control.

A simpler way would be to just do the following:

Private Sub CmdBars_Execute(ByVal Control As XtremeCommandBars.ICommandBarControl)
   MsgBox Control.Text
End Sub

Best Regards
Kim



Posted By: finn
Date Posted: 05 March 2005 at 7:21am

Thank you very much!

It works very well!

Yours,

Finn!




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net