FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Tooltips sobre posicionados!
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Tooltips sobre posicionados!
Posted: Tue Aug 26, 2008 01:31 PM
Una nueva Clase TToolTip para FWH 8.09, que permite sobre poner tooltips en los controles!

test.prg
// In place tooltips demo

#include "FiveWin.ch"

function Main()

   local oWnd, oSay1, oSay2, oSay3

   DEFINE WINDOW oWnd TITLE "Tooltips in place test"

   @ 2, 2 SAY oSay1 PROMPT "This is a tooltips test for any text length" COLOR "N/W*"
      
   oSay1:lWantClick = .T.
   oSay1:bMMoved = { || ShowTooltip( oSay1 ) }
   
   @ 4, 2 SAY oSay2 PROMPT "This is another long text" COLOR "N/R*"

   oSay2:lWantClick = .T.
   oSay2:bMMoved = { || ShowTooltip( oSay2 ) }

   @ 6, 2 SAY oSay3 PROMPT "FiveWin power!" COLOR "N/G*"

   oSay3:lWantClick = .T.
   oSay3:bMMoved = { || ShowTooltip( oSay3 ) }

   ACTIVATE WINDOW oWnd

return nil

function ShowTooltip( oSay )

   if oSay:Cargo == nil
      oSay:Cargo = TToolTip():New( oSay, oSay:GetText() )
      oSay:Cargo:SetWidth( 1000 )
   endif
   
return nil



regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Tooltips sobre posicionados!
Posted: Tue Aug 26, 2008 01:33 PM

Aqui teneis el EXE por si quereis probarlos:

http://rapidshare.com/files/140252181/test.zip.html

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Tooltips sobre posicionados!
Posted: Tue Aug 26, 2008 05:32 PM

Maestro, podrias aprovechar y mejorar la velocidad de los tooltips, están mui rápidos.

Regards, saludos.

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Tooltips sobre posicionados!
Posted: Tue Aug 26, 2008 05:50 PM

João,

Quieres que se muestren más lentos ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Tooltips sobre posicionados!
Posted: Tue Aug 26, 2008 08:38 PM
Antonio Linares wrote:João,

Quieres que se muestren más lentos ?


Si Maestro, como en este ejemplo By Rossine, con una pequeña modificación en la classe WINDOW.PRG, mis TOOLTIPS, están excelentes.


    REDEFINE BTNGET aGet[5]    VAR TPFORCOD2   ID 24 PICTURE "@!"            ;
             WHEN( lPesquisa )                                               ;
             OF oDlg           UPDATE RESOURCE "FOLDER16"                    ;
             FONT oFont                                                      ;
             COLOR nRGB( 000, 000, 000 ), nRGB( 243, 250, 200 )              ;
             VALID  ( PESQUISA_TPFOR( TPFORCOD2, aGet, CADPRODU, CADFORNE,   ;
                                                       CADMOVCP, CADPRFOR,   ;
                                                       CADCUSTO, PRIPARAM,   ;
                                                       CADPARAM, CADTPFOR ) );
             ACTION ( PESQUISA_TPFOR( TPFORCOD2, aGet, CADPRODU, CADFORNE,   ;
                                                       CADMOVCP, CADPRFOR,   ;
                                                       CADCUSTO, PRIPARAM,   ;
                                                       CADPARAM, CADTPFOR  ) )

    //-> By Rossine The Best Mineiro - Mudancas em WINDOW.PRG 16/01/2008
    aGet[5]:cToolTip         := OemToAnsi( "Click no BotÆo ao Lado, Para  " +;
                                           "Visualizar o Banco de Dados dos " +      ;
                                           "Tipos de Fornecedores, Veja os C¢digos - <F7>-Mostra." )
    aGet[5]:lToolTipBallon   := .T.
    aGet[5]:nTooltipWidth    := 120  // 100
    aGet[5]:nTooltipTexColor := nRGB( 000, 000, 000 )
    aGet[5]:nTooltipBKColor  := nRGB( 250, 250, 250 )
    aGet[5]:cTooltipTitle    := OemToAnsi( "Tipos de Fornecedores" )
    aGet[5]:nTooltipIcon     := 1  && 0=NONE / 1=TTI_INFO / 2=TTI_WARNING / 3=TTI_ERROR
    //-> 0=TTDT_AUTOMATIC / 1=TTDT_RESHOW / 2=TTDT_AUTOPOP / 3=TTDT_INITIAL
    aGet[5]:nSetDelayType    := 2
    aGet[5]:nSetDelayTime    := 350000 //-> Velocidade do TOOLTIP-> +- 50 Secs
    /*
    aGet[5]:nSetDelayType    := 2
    aGet[5]:nSetDelayTime    := 32767  //-> Velocidade do TOOLTIP-> +- 1:30 Secs
    */


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341

Continue the discussion