Visit Gigasoft's Web Site
 ProEssentials v10 Help

Common Question 12

I want the user to be able to click a hot-spot. How do I do this?

ProEssentials has many hot-spots which the user can click or double-click.

 

Hot-Spot Type

What the end-user clicks

Data Points

Bars, symbols, and line/area junctures.

Subset Labels

Subset label text in graph and table legend areas.

Point Labels

PointLabels which are placed below x axis on Graph objects.

Graph Coordinates

Any location inside graph's grid.

Table Coordinates

Any location inside Graph object's table.

Graph Annotations

Text, symbols, line junctures, rect corners.

Line Annotations

Anywhere on a horizontal or vertical line.

Axis Annotations

Annotation text.

Main Title

Main Title text.

Sub Title

Sub Title text.

Main Title

Main Title text.

MultiSubTitle

Multi Sub Title text.

MultiBottomTitle

Multi Bottom Title text.

Y and X Axis Labels

Axis Label text.

Y and X Axis

Any location along entire axis.

Y and X Axis Grid Numbers

Text showing value of grid lines.

Table Annotation

Any item within a table annotation.

 

Hot-Spot Type

Property used to enable Hot-Spot

Data Points

AllowDataHotSpots

Subset Labels

AllowSubsetHotSpots

Point Labels

AllowPointHotSpots

Graph Coordinates

AllowGraphHotSpots

Table Coordinates

AllowTableHotSpots

Graph Annotations

AllowGraphAnnotHotSpots

Line Annotations

AllowHorzLineAnnotHotSpots

Graph Annotations

AllowGraphAnnotHotSpots

AllowVertLineAnnotHotSpots

Axis Annotations

AllowXAxisAnnotHotSpots

AllowYAxisAnnotHotSpots

Main Title

AllowTitleHotSpots

Sub Title

AllowTitleHotSpots

MultiSubTitle

AllowSubTitleHotSpots

MultiBottomTitle

AllowBottomTitleHotSpots

Y Axis Label

AllowAxisLabelHotSpots

X Axis Label

AllowAxisHotSpots

Y Axis

AllowAxisHotSpots

X Axis

AllowAxisHotSpots

Y Axis Grid Numbers

AllowGridNumberHotSpotY

X Axis Grid Numbers

AllowGridNumberHotSpotX

Table Annotation

TAHotSpot

.NET Hot-Spot Handling

For .NET developers, event listings can also be found via the .NET Reference

.NET, OCX, and VCL Hot-Spot Handling

.NET, OCX, and VCL developers respond to hot-spots via events built into the visual interface. Utilizing these events is as easy as setting the above properties to TRUE and placing your code inside the event names as follows.

 

Note that all hot spots provide the DblClk argument to signify whether the user clicked or double-clicked the hot spot. Also note that you can not respond to both the click and double-click events because the double-click event also initially triggers a click event.

Hot-Spot Type

.NET Event Name

OCX, VCL Event Name

Event Arguments

Data Points

PeDataHotSpot

DataHotSpot

Subset and Point indices

Subset Labels

PeSubsetHotSpot

SubsetHotSpot

Subset index

Point Labels

PePointHotSpot

PointHotSpot

Point index

Graph Coordinates

PeGraphHotSpot

GraphHotSpot

X, Y coords and Axis index

Table Coordinates

PeTableHotSpot

TableHotSpot

Subset and Point indices

Graph Annotations

PeGraphAnnotHotSpot

GraphAnnotHotSpot

Annotation Index

Line Annotations

PeHorzLineAnnotHotSpot

PeVertLineAnnotHotSpot

HorzLineAnnotHotSpot

VertLineAnnotHotSpot

Annotation Index

Axis Annotations

PeXAxisAnnotHotSpot

PeYAxisAnnotHotSpot

XAxisAnnotHotSpot

YAxisAnnotHotSpot

Annotation Index

Main Title

PeMainTitle

MainTitle

na

Sub Title

PeSubTitle

SubTitle

na

MultiSubTitle

PeMultiSubTitle

MultiSubTitle

Title index and Justification

MultiBottomTitle

PeMultiBottomTitle

MultiBottomTitle

Title index and Justification

Y Axis Label

PeYAxisLabel

YAxisLabel

Axis index and nRight*

X Axis Label

PeXAxisLabel

XAxisLabel

nTop*

Y Axis

PeYAxis

YAxis

Axis index, nRight*, and Yval*

X Axis

PeXAxis

XAxis

nTop*, and Xval*

Y or X Axis Grid Number

PeGridNumber

YAxis

Axis index, nRight*, and Yval*

Table Annotation

PeTableAnnotation

TableAnnotation

nIndex, nRow and nColumn indices

 

*nRight is 0 for left y axis and 1 for right y axis.

*nTop is 0 for bottom x axis and 1 for top x axis.

*Yval and *Xval are the graph axis location in data units.

 

C/C++ Hot-Spot Handling

C/C++ SDK developers respond to hot-spots via the Windows notification message mechanism. This mechanism uses the WM_COMMAND message to pass notification codes in HIWORD(wParam) for 32 bit targets. You will respond to either the PEWN_CLICKED or PEWN_DBLCLICKED notification codes and then use PEvget to retrieve the PEP_structHOTSPOTDATA property. This property will inform you of the type of Hot-Spot selected (if any) and also provides information with respect to that selection. In the case of a Graph Hot-Spot (PEHS_GRAPH), you will need to retrieve the PEP_structGRAPHLOC property to determine the graph coordinates where the user clicked.

 

The following is a C/C++ example of responding to a Subset Hot-Spot. For those of you not familiar with the Microsoft Foundation Classes, OnCommand is a function that processes the WM_COMMAND message.

 

BOOL CDemo2View::OnCommand(WPARAM wp, LPARAM lp)

{

HOTSPOTDATA HSData;

#ifdef _WIN32

switch (HIWORD(wp))

#else // 16 bit

switch (HIWORD(lp))

#endif

{

case PEWN_CLICKED:

PEvget(m_hPE, PEP_structHOTSPOTDATA, &HSData);

if (HSData.nHotSpotType == PEHS_SUBSET)

{

char szTmp[128];

char szSubset[48];

strcpy(szTmp, "You clicked subset ");

sprintf(szSubset, "%i", HSData.w1);

strcat(szTmp, szSubset);

strcat(szTmp, ". Subset label is ");

PEvgetcell(m_hPE, PEP_szaSUBSETLABELS, HSData.w1, szSubset);

strcat(szTmp, szSubset);

strcat(szTmp, ".");

MessageBox(szTmp,"Subset Hot-Spot",MB_OK|MB_ICONINFORMATION);

}

return TRUE;

}

return CView::OnCommand(wp, lp);

}