21.08.2013 Views

OpenOffice.org BASIC Guide.pdf - OpenOffice.org wiki

OpenOffice.org BASIC Guide.pdf - OpenOffice.org wiki

OpenOffice.org BASIC Guide.pdf - OpenOffice.org wiki

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Events 220<br />

Select Case Event.KeyCode<br />

Case com.sun.star.awt.Key.RETURN<br />

Msg = "Return pressed"<br />

Case com.sun.star.awt.Key.TAB<br />

Msg = "Tab pressed"<br />

Case com.sun.star.awt.Key.DELETE<br />

Msg = "Delete pressed"<br />

Case com.sun.star.awt.Key.ESCAPE<br />

Msg = "Escape pressed"<br />

Case com.sun.star.awt.Key.DOWN<br />

Msg = "Down pressed"<br />

Case com.sun.star.awt.Key.UP<br />

Msg = "Up pressed"<br />

Case com.sun.star.awt.Key.LEFT<br />

Msg = "Left pressed"<br />

Case com.sun.star.awt.Key.RIGHT<br />

Msg = "Right pressed"<br />

Case Else<br />

Msg = "Character " & Event.KeyChar & " entered"<br />

End Select<br />

MsgBox Msg<br />

End Sub<br />

Information about other keyboard constants can be found in the API Reference under the<br />

com.sun.star.awt.Key<br />

group of constants.<br />

Focus Events<br />

Focus events indicate if a control element receives or loses focus. You can use these events<br />

to, for example, determine if a user has finished processing a control element so that you<br />

can update other elements of a dialog. The following focus events are available:<br />

When receiving focus<br />

element receives focus<br />

When losing focus<br />

element loses focus<br />

The Event objects for the focus events are structured as follows:<br />

FocusFlags (short)<br />

cause of focus change (default value in accordance with<br />

com.sun.star.awt.FocusChangeReason<br />

)<br />

NextFocus (Object)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!