Gambas Documentation
Application Repository
Code Snippets
Compilation & Installation
Components
gb
gb.args
gb.cairo
gb.chart
gb.clipper
gb.complex
gb.compress
gb.crypt
gb.data
gb.db
gb.db.form
gb.db.mysql
gb.db.odbc
gb.db.postgresql
gb.db.sqlite2
gb.db.sqlite3
gb.dbus
gb.dbus.trayicon
gb.debug
gb.desktop
gb.desktop.gnome.keyring
gb.desktop.x11
gb.eval
gb.eval.highlight
gb.form
gb.form.dialog
gb.form.editor
gb.form.htmlview
gb.form.mdi
gb.form.print
gb.form.stock
gb.form.terminal
gb.gmp
gb.gsl
gb.gtk
gb.gtk.opengl
gb.gtk3
gb.gtk3.opengl
gb.gtk3.webview
gb.gui
gb.gui.opengl
gb.gui.qt
gb.gui.qt.ext
gb.gui.qt.opengl
gb.gui.qt.webkit
gb.gui.trayicon
gb.gui.webview
gb.hash
gb.highlight
gb.image
gb.image.effect
gb.image.imlib
gb.image.io
gb.inotify
gb.jit
gb.libxml
gb.logging
gb.map
gb.markdown
gb.media
gb.media.form
gb.memcached
gb.mime
gb.mongodb
gb.mysql
gb.ncurses
gb.net
gb.net.curl
gb.net.pop3
gb.net.smtp
gb.openal
gb.opengl
gb.opengl.glsl
gb.opengl.glu
gb.opengl.sge
gb.openssl
gb.option
gb.pcre
gb.pdf
gb.poppler
gb.qt4
.combobox.item
.container.children
.Menu.Children
.TabStripContainer
.TabStripContainer.Children
.TextArea.Selection
.TextBox.Selection
.Window.Controls
.Window.Menus
_ColumnView_Columns
_ComboBox_Item
_ComboBox_Selection
_Draw_Clip
_Draw_Style
_GridView_Cell
_GridView_Column
_GridView_Columns
_GridView_Data
_GridView_Row
_GridView_Rows
_Gui
_IconView_Item
_ListBox_Item
_split
_TreeView
_TreeView_Item
Action
Align
Animation
Application
Arrange
Border
Button
CheckBox
Clipboard
Color
ColumnView
ComboBox
Container
ContainerChildren
Control
Cursor
Desktop
Dialog
Direction
Drag
Draw
DrawingArea
embedder
Fill
Font
Fonts
Form
Frame
GridView
HBox
HPanel
HSplit
IconView
Image
Key
Label
Line
ListBox
ListView
Menu
Message
Mouse
Alt
Arrow
Blank
Button
Click
Control
Cross
Custom
Default
Delta
Forward
Horizontal
Inside
Left
Meta
Middle
Move
Normal
Orientation
Pointing
Right
ScreenX
ScreenY
Shift
SizeAll
SizeE
SizeH
SizeN
SizeNE
SizeNESW
SizeNW
SizeNWSE
SizeS
SizeSE
SizeSW
SizeV
SizeW
SplitH
SplitV
StartX
StartY
State
Text
Translate
Vertical
Wait
X
Y
MovieBox
Paint
PaintBrush
PaintExtents
PaintMatrix
Panel
Picture
PictureBox
Point
Pointer
PointF
Printer
ProgressBar
RadioButton
Rect
RectF
Screen
Screens
Scroll
ScrollArea
ScrollBar
ScrollView
Select
Separator
Slider
SpinBox
Splitter
Spring
Style
SvgImage
TabStrip
TextArea
TextBox
TextLabel
ToggleButton
ToolButton
trayicon
trayicons
TreeView
UserContainer
UserControl
VBox
VPanel
VSplit
Watcher
Window
Windows
gb.qt4.ext
gb.qt4.opengl
gb.qt4.webkit
gb.qt4.webview
gb.qt5
gb.qt5.ext
gb.qt5.opengl
gb.qt5.webkit
gb.qt5.webview
gb.qt6
gb.qt6.ext
gb.qt6.opengl
gb.qt6.webview
gb.report
gb.report2
gb.scanner
gb.sdl
gb.sdl.sound
gb.sdl2
gb.sdl2.audio
gb.settings
gb.signal
gb.term
gb.test
gb.util
gb.util.web
gb.v4l
gb.vb
gb.web
gb.web.feed
gb.web.form
gb.web.gui
gb.xml
gb.xml.html
gb.xml.rpc
gb.xml.xslt
Controls pictures
Deprecated components
Developer Documentation
Development Environment Documentation
Documents
Error Messages
Gambas Playground
How To's
Language Index
Language Overviews
Last Changes
Lexicon
README
Search the wiki
To Do
Topics
Tutorials
Wiki License
Wiki Manual

Mouse (gb.qt4)

This class is used for getting information about a mouse event from another control, or about the mouse in general.

Information about mouse events is available during mouse event handlers only!

Mouse.ScreenX and Mouse.ScreenY are available anytime.

It also defines the constants used with the Mouse property.

Since 3.17

The cursor constants are now deprecated, and have been moved to the Cursor class.

This class is static.

Constants
Arrow   Constant used with the Mouse property of controls, indicating a cursor shape.
Blank   Constant used with the Mouse property of controls, indicating that a control displays no cursor.
Cross   Constant used with the Mouse property of controls, indicating a cursor shape.
Custom   Indicates that the mouse cursor of a control is a customed picture.
Default   Constant used with the Mouse property, indicating that a control displays the same cursor than its parent.
Horizontal   Indicate a horizontal mouse wheel event.
Pointing   Constant used with the Mouse property of controls, indicating a cursor shape.
SizeAll   Constant used with the Mouse property of controls, indicating a cursor shape.
SizeE   Constant used with the Mouse property of controls, indicating a cursor shape.
SizeH   Constant used with the Mouse property of controls, indicating a cursor shape.
SizeN   Constant used with the Mouse property of controls, indicating a cursor shape.
SizeNE   Constant used with the Mouse property of controls, indicating a cursor shape.
SizeNESW   Constant used with the Mouse property of controls, indicating a cursor shape.
SizeNW   Constant used with the Mouse property of controls, indicating a cursor shape.
SizeNWSE   Constant used with the Mouse property of controls, indicating a cursor shape.
SizeS   Constant used with the Mouse property of controls, indicating a cursor shape.
SizeSE   Constant used with the Mouse property of controls, indicating a cursor shape.
SizeSW   Constant used with the Mouse property of controls, indicating a cursor shape.
SizeV   Constant used with the Mouse property of controls, indicating a cursor shape.
SizeW   Constant used with the Mouse property of controls, indicating a cursor shape.
SplitH   Constant used with the Mouse property of controls, indicating a cursor shape.
SplitV   Constant used with the Mouse property of controls, indicating a cursor shape.
Text   Constant used with the Mouse property of controls, indicating a cursor shape.
Vertical   Indicate a vertcial mouse wheel event.
Wait   Constant used with the Mouse property of controls, indicating a cursor shape.

Static properties
Alt   Returns if the ALT key is pressed.
Button   Return which button is pressed or released during a MouseDown or MouseUp event.
Click   Return the number of successive clicks on the mouse button.
Control   Returns if the CONTROL key is pressed.
Delta   Returns the delta value of a MouseWheel event.
Forward   Return if the mouse wheel has been scrolled forward.
Left   Returns if the mouse left button is pressed.
Meta   Returns if the META key is pressed.
Middle   Returns if the mouse middle button is pressed.
Normal   Indicates that no special key was pressed.
Orientation   Returns the orientation of a MouseWheel event.
Right   Returns if the mouse right button is pressed.
ScreenX   Returns the current absolute horizontal position of the cursor.
ScreenY   Returns the current absolute vertical position of the cursor.
Shift   Returns if the SHIFT key is pressed.
StartX   Returns the value of Mouse.X at the beginning of the event.
StartY   Returns the value of Mouse.Y at the beginning of the event.
State   Return the state of the mouse buttons when the mouse event was generated.
X   Returns the relative horizontal position of the cursor of a mouse event.
Y   Returns the relative vertical position of the cursor of a mouse event.

Static methods
Inside   Return if the mouse cursor is inside a specific control.
Move   Moves the cursor on the screen at a specified position.
Translate   Translate the current mouse event by the specified distance.

See also

Examples for mouse events: