Navigation:  Classes > bBrowser >

bBrowser:GetCaptionFromPoint()

Print this Topic    Previous pageReturn to chapter overviewNext page

Purpose

Determines the caption of a column relating to a specific point.

Class

bBrowser

Type

Method

Syntax

<oBrowser>:GetCaptionFromPoint(<oPoint>) Æ oColumn

Arguments

<oPoint>The point object for which the column is to be determined.
Data type:Point

Return Value

oCellThe column whose caption is under the specified point.
Data type:bBrowserColumn

Description

bBrowser:GetCaptionFromPoint() returns the column whose column caption is under the specified point.

 

The coordinate refers to the origin left above within the ClientArea (CanvasArea) of the browser.

 

bBrowser uses the method to determine the column under the mouse when moving the column with the mouse.

Samples

The following sample intercepts all mouse movements in a window and displays in the caption of the window for the respective position of the mouse the column caption that is under it.

 

METHOD Dispatch(oEvent) CLASS myDataWindow

       LOCAL oColumn  AS bBrowserColumn

       LOCAL oPoint   AS Point

       LOCAL sPoint   IS _winPoint

 

       // intercepts mouse movements

       IF oEvent:Message=WM_SETCURSOR

               IF SELF:oDCbBrowser<>NULL_OBJECT

                       // determine the position of the mouse

                       // -> the position refers to the left

                       //    upper corner of the desktop

                       GetCursorPos(@sPoint)

 

                       // transform mouse position on the left

                       // upper corner of the bBrowser

                       ScreenToClient(SELF:oDCbBrowser:Handle(), @sPoint)

                       oPoint := Point{sPoint.X, sPoint.Y}

 

                       // determine the cell under the mouse

                       oColumn := SELF:oDCBrowser:GetCaptionFromPoint(oPoint)

 

                       // output the column caption in the caption of the window

                       IF EMPTY(oColumn)

                               SELF:Caption := ""

                       ELSE

                               SELF:Caption := "Spalte: " + oColumn:Caption

                       ENDIF

               ENDIF

       ENDIF

       RETURN SUPER:Dispatch(oEvent)

See Also

bBrowser:GetCaptionFrameFromPoint()

bBrowser:GetCaptionRect()

bBrowser:GetCellToPoint()

bBrowser:GetCellRect()

bBrowser:GetColumnRect()

bBrowser:GetColumnToPoint()

bBrowser:GetFooterFromPoint()

 


Page url: http://www.YOURSERVER.com/index.html?bbrowser_getcaptionfrompoint.htm