Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

LoseFocus – PB Docs 150 – PowerBuilder Library

LoseFocus – PB Docs 150

LoseFocus event

Description

Occurs just before a control loses focus (before it becomes
inactive).

Event ID

Event ID

Description

pbm_controltypekillfocus

UserObject (standard visual user objects
only)

pbm_bnkillfocus

CheckBox, CommandButton, Graph, OLE,
Picture, PictureHyperLink, PictureButton, RadioButton, StaticText,
StaticHyperLink

pbm_cbnkillfocus

DropDownListBox, DropDownPictureListBox

pbm_dwnkillfocus

DataWindow

pbm_enkillfocus

SingleLineEdit, EditMask, MultiLineEdit

pbm_killfocus

HProgressBar, VProgressBar, DatePicker, MonthCalendar,
InkEdit, InkPicture

pbm_lbnkillfocus

ListBox, PictureListBox

pbm_lvnkillfocus

ListView

pbm_renkillfocus

RichTextEdit

pbm_sbnkillfocus

HScrollBar, HTrackBar, VScrollBar, VTrackBar

pbm_tcnkillfocus

Tab

pbm_tvnkillfocus

TreeView

Parameters

None

Return Values

Long. Return code choices (specify in
a RETURN statement):

  • 0 Continue
    processing

Usage

Write a script for a control’s LoseFocus event if
you want some processing to occur when the user changes focus to
another control.

For controls that contain editable text, losing focus can
also cause a Modified event to occur.

In a RichTextEdit control, a LoseFocus event occurs when the
user clicks on the control’s toolbar. The control does
not actually lose focus.

Because the MessageBox function grabs focus,
you should not use it when focus is changing, such as in a LoseFocus
event. Instead, you might display a message in the window’s
title or a MultiLineEdit.

Examples

[Example 1]

In this script for the LoseFocus event of a SingleLineEdit sle_town,
the user is reminded to enter information if the text box is left
empty:

[Example 2]

Statements in the LoseFocus event for a DataWindow control dw_emp can
trigger a user event whose script validates the last item the user entered.

This statement triggers the user event ue_accept:

This statement in ue_accept calls the AcceptText function:

This script for the LoseFocus event of a RichTextEdit
control performs processing when the control actually loses focus:

This script gets the name of the control instead:

See Also


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x