FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour assign a different tooltip text to a get on execution
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
assign a different tooltip text to a get on execution
Posted: Mon Jun 08, 2015 07:03 AM

I need to assign a tooltip to a get when I found n record ( after a search)
and then I need to show the tooltip permanent

sample :

aget[1]:cTooltip:= str(OrdKeyCount())+" records found "

why it not run ? let me sad ctooltip not found
How i can make to show the tooltip ( often i move the mouse into) ?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: assign a different tooltip text to a get on execution
Posted: Tue Jun 09, 2015 11:58 AM

aget[1]:cTooltip:= { || str(OrdKeyCount())+" records found " }

Regards



G. N. Rao.

Hyderabad, India
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: assign a different tooltip text to a get on execution
Posted: Fri Jun 12, 2015 08:46 AM

thanks Rao

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: assign a different tooltip text to a get on execution
Posted: Fri Jun 12, 2015 08:56 AM
but not run ok I wish show the number of records ( with the tooltip) when I use the incfilter search on xbrowse

test
Code (fw): Select all Collapse
#include "fivewin.ch"
#include "xBrowse.ch"

#define  LIGHTCYAN    nRGB( 203, 225, 252 )

#define MEM_FILE_USER     "User.mem"
#define MEM_USER_SECTION  "Browse"

REQUEST DBFCDX
REQUEST DBFFPT
EXTERNAL ORDKEYNO,ORDKEYCOUNT,ORDCREATE,ORDKEYGOTO


static oTitle
static aFlds,aHdrs,nWild

function Main()
   local oDlg, oGrid, oFont
   local nOrder:= 1
    local nRecno:= 1
   RddSetDefault( "DBFCDX" )
   SetHandleCount( 100 )




   USE CUSTOMER ALIAS CL
   INDEX ON CL->FIRST  TAG FIRST TO CUSTOMER

   DEFINE FONT oFont NAME 'Tahoma' SIZE 0, -12

     nWild := 2

 aBrowse   := {   { { || CL->FIRST}, i18n("Cognome"), 150 },;
                  { { || CL->LAST }, i18n("Nome"), 100 },;
                  { { || CL->STREET }, i18n("Indirizzo"), 190 },;
                  { { || CL->STATE}, i18n("Stato"), 145 } }





   DEFINE DIALOG oDlg SIZE 640,440 PIXEL ;
      FONT oFont TITLE 'Test '


   oGrid := TXBrowse():New( oDlg )
   oGrid:nTop    := 30
   oGrid:nLeft   := 2
   oGrid:nBottom := 200
   oGrid:nRight  := 320



  FOR i := 1 TO Len(aBrowse)
      oCol := oGrid:AddCol()
      oCol:bStrData := aBrowse[ i, 1 ]
      oCol:cHeader  := aBrowse[ i, 2 ]
      oCol:nWidth   := aBrowse[ i, 3 ]

   NEXT



oGrid:lIncrFilter   := .t.
oGrid:lSeekWild     := ( nWild == 2 )
oGrid:cFilterFld    := "FIRST"


oGrid:SetRDD()
oGrid:CreateFromCode()



  CL->(DbSetOrder(nOrder))

   if nRecNo < CL->(LastRec()) .AND. nRecno != 0
      CL->(DbGoTo(nRecno))
   else
      CL->(DbGoTop())
   endif





ACTIVATE DIALOG oDlg CENTERED ;
          ON INIT( Create_bar(oDlg), Cerca_cliente(oTitle,"CL",oGrid) )

return nil

Function Create_bar(oDlg)
    DEFINE BUTTONBAR oTitle _3D SIZE 44, 46 OF oDlg
return nil



Function Cerca_cliente(oTitle,cdbf,oGrid)
   Local nLen := Len( oGrid:aCols )
   Local n
   Local oCbx
   Local cCampo := oGrid:cFilterFld

   /*
    aFlds :=array( nLen )
    aHdrs:= array( nLen )

        FOR n = 2 TO nLen
           aFlds   [ n ]:= oGrid:aCols[ n ]:cExpr
           aHdrs   [ n ]:= oGrid:aCols[ n ]:cHeader
        NEXT

     */

     nWild := 2
       cList := "FIRST,LAST,STREET,STATE"
       aFlds :=  HB_ATokens( cList, ',' )
       aHdrs := {              i18n("Cognome") ,;
                               i18n("Nome")       ,;
                               i18n("Indirizzo")             ,;
                               i18n("Stato")      }




    @ 6.9, 10 COMBOBOX oCbx VAR  cCampo  ;
      ITEMS  aHdrs ;
      ON CHANGE (oGrid:cFilterFld :=aFlds[ocbx:nat],  oGrid:Seek( "" ), oGrid:SetFocus() ) ;
      SIZE 150,400 PIXEL OF oTitle




   @ 6.9, 190 COMBOBOX nWild ITEMS { "Voci che iniziano con..", "Voci che contengono...." } ;
      ON CHANGE ( oGrid:lSeekWild := ( nWild == 2 ), ;
                  oGrid:Seek( If( oGrid:lSeekWild, oGrid:cSeek, "" ) ), ;
                  oGrid:SetFocus() ) ;
      SIZE 150,400 PIXEL OF oTitle

 /I wish change this into a get  
     @ 6.9,340 say oGrid:oSeek PROMPT oGrid:cSeek SIZE 180,20 PIXEL ;
         OF oTitle COLOR CLR_BLACK,CLR_WHITE PICTURE '@!' BORDER


return nil
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion