Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Toolbar and texbox on a Form

Status
Not open for further replies.

mstrcmtr

Programmer
Nov 14, 2007
103
PK
Created Toolbar containing 4 command buttons

While running form toolbar buttons are active

e.g.

On a Form focus at Textbox1 then user click on any of toolbar button what is the way to stop running coding of Textbox1 lost focus event
 
A toolbar does NOT move focus away from active controls on a form.

Lost Focus event therrefor does NOT run. If you want that, but Lostfocus actually IS run, then you have to have code in the Toolbar buttons doing something like _screen.activeform.activecontrol.SetFocus(), which triggers the event chain valid/lostfocus/when/gotfocus.

This is typical code of a toolbar save button, for example, because without this the current edited value of the active control is not saved.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top