Tooltips sobre posicionados!

Tooltips sobre posicionados!

Postby Antonio Linares » Tue Aug 26, 2008 1:31 pm

Una nueva Clase TToolTip para FWH 8.09, que permite sobre poner tooltips en los controles!

test.prg
Code: Select all  Expand view
// 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     

Image
Image
Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41904
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » Tue Aug 26, 2008 1: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41904
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby karinha » Tue Aug 26, 2008 5: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
User avatar
karinha
 
Posts: 7643
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Postby Antonio Linares » Tue Aug 26, 2008 5:50 pm

João,

Quieres que se muestren más lentos ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41904
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby karinha » Tue Aug 26, 2008 8: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.


Code: Select all  Expand view
    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
User avatar
karinha
 
Posts: 7643
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], groiss and 107 guests