I do not get tooltips in DCBROWSECOL.
What is my mistake?
Regards,
Jack Duijf
Code: Select all
#include "dcdialog.ch"
#pragma Library("dclipx.lib")
PROCEDURE MAIN
LOCAL GetList := {}
LOCAL aData := {}
LOCAL GetOptions := {}
LOCAL oBrowse := nil
LOCAL oBox := oBox
LOCAL n := 0
LOCAL nType := 1
Aadd(aData,{1,"Item 1","Type 1",1})
Aadd(aData,{2,"Item 2","Type 2",2})
Aadd(aData,{3,"Item 3","Type 1",1})
Aadd(aData,{4,"Item 4","Type 2",2})
Aadd(aData,{5,"Item 5","Type 1",1})
Aadd(aData,{6,"Item 6","Type 2",2})
Aadd(aData,{7,"Item 7","Type 1",1})
Aadd(aData,{8,"Item 8","Type 2",2})
Aadd(aData,{9,"Item 9","Type 1",1})
@ 0,0 DCGROUP oBox SIZE 30,3 CAPTION "Show"
@ 1,1 DCRADIOBUTTON nType PROMPT "Type 1" VALUE 1 PARENT oBox ACTION {||oBrowse:GoTop(),oBrowse:Refresh()}
@ 1,15 DCRADIOBUTTON nType PROMPT "Type 2" VALUE 2 PARENT oBox ACTION {||oBrowse:GoTop(),oBrowse:Refresh()}
DCSETPARENT TO
@ 4,2 DCBROWSE oBrowse DATA aData SIZE 100,15 NOHSCROLL ;
PRESENTATION DC_BrowPres() ;
ITEMSELECTED {||MsgBox(aData[n,2] + " selected.")} ;
FIT POINTER n ;
DCBROWSECOL ELEMENT 1 HEADER "Id" WIDTH 3 PARENT oBrowse TOOLTIP "Id"
DCBROWSECOL ELEMENT 2 HEADER "Name" WIDTH 15 PARENT oBrowse TOOLTIP "Name"
DCBROWSECOL ELEMENT 3 HEADER "Type" WIDTH 15 PARENT oBrowse ;
COLOR {||iif(n = 5,{GRA_CLR_YELLOW,GRA_CLR_RED},{GRA_CLR_RED,GRA_CLR_YELLOW}) }
DCGETOPTIONS AUTORESIZE
DCREAD GUI FIT ADDBUTTONS MODAL ;
OPTIONS GetOptions ;
TITLE 'How to filter elements in a array?'
Return