list_20view_20with_20tooltips
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
list_20view_20with_20tooltips [2018/03/31 13:19] – external edit 127.0.0.1 | list_20view_20with_20tooltips [2024/01/05 00:22] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 2: | Line 2: | ||
//by Richard Russell, April 2011//\\ \\ A **List View** control has built-in support for tooltips, but this feature requires your program to respond to the **LVN_EX_INFOTIP** notification, | //by Richard Russell, April 2011//\\ \\ A **List View** control has built-in support for tooltips, but this feature requires your program to respond to the **LVN_EX_INFOTIP** notification, | ||
+ | <code bb4w> | ||
REM. List View with tooltips, Richard Russell, 02-Apr-2011 | REM. List View with tooltips, Richard Russell, 02-Apr-2011 | ||
+ | | ||
REM. Install libraries: | REM. Install libraries: | ||
INSTALL @lib$+" | INSTALL @lib$+" | ||
+ | | ||
nColumns% = 5 | nColumns% = 5 | ||
+ | | ||
REM!WC Windows constants: | REM!WC Windows constants: | ||
LVCF_FMT = 1 | LVCF_FMT = 1 | ||
Line 27: | Line 28: | ||
TTM_NEWTOOLRECT = &406 | TTM_NEWTOOLRECT = &406 | ||
TTM_UPDATETIPTEXT = &40C | TTM_UPDATETIPTEXT = &40C | ||
+ | | ||
ON ERROR SYS " | ON ERROR SYS " | ||
ON CLOSE PROCcleanup : QUIT | ON CLOSE PROCcleanup : QUIT | ||
+ | | ||
REM. Declare and initialise structures: | REM. Declare and initialise structures: | ||
DIM pt{x%,y%}, rc{l%, | DIM pt{x%,y%}, rc{l%, | ||
Line 40: | Line 41: | ||
lvc.mask% = LVCF_WIDTH OR LVCF_SUBITEM OR LVCF_FMT OR LVCF_TEXT | lvc.mask% = LVCF_WIDTH OR LVCF_SUBITEM OR LVCF_FMT OR LVCF_TEXT | ||
lvi.mask% = LVIF_TEXT OR LVIF_STATE OR LVIF_PARAM | lvi.mask% = LVIF_TEXT OR LVIF_STATE OR LVIF_PARAM | ||
+ | | ||
REM. Create list view control: | REM. Create list view control: | ||
SYS " | SYS " | ||
Line 58: | Line 59: | ||
ti.hwnd% = hwndLV% | ti.hwnd% = hwndLV% | ||
SYS " | SYS " | ||
+ | | ||
REM. Populate list view control: | REM. Populate list view control: | ||
FOR item% = 0 TO 10 | FOR item% = 0 TO 10 | ||
Line 74: | Line 75: | ||
NEXT col% | NEXT col% | ||
NEXT item% | NEXT item% | ||
+ | | ||
REM. Polling loop, monitoring mouse position: | REM. Polling loop, monitoring mouse position: | ||
oldx% = -1 | oldx% = -1 | ||
Line 88: | Line 89: | ||
ENDIF | ENDIF | ||
UNTIL FALSE | UNTIL FALSE | ||
+ | | ||
DEF PROCtooltip(x%, | DEF PROCtooltip(x%, | ||
LOCAL tip$ | LOCAL tip$ | ||
Line 106: | Line 107: | ||
ENDIF | ENDIF | ||
ENDPROC | ENDPROC | ||
+ | | ||
DEF PROCcleanup | DEF PROCcleanup | ||
hwndLV% += 0 : IF hwndLV% PROC_closewindow(hwndLV%) : hwndLV% = 0 | hwndLV% += 0 : IF hwndLV% PROC_closewindow(hwndLV%) : hwndLV% = 0 | ||
ENDPROC | ENDPROC | ||
+ | </ |
list_20view_20with_20tooltips.1522502366.txt.gz · Last modified: 2024/01/05 00:17 (external edit)