FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Efecto no deseado en RIBBON Y TPANEL (SOLUCIONADO)
Posts: 1074
Joined: Fri Oct 07, 2005 01:56 PM
Efecto no deseado en RIBBON Y TPANEL (SOLUCIONADO)
Posted: Sun Apr 22, 2012 07:34 PM
Estimados, en los ribbon y tPanel sale un efecto no deseado

en el ejemplo c:\fwh\samplos\ribbon.prg colocar lo siguiente
Code (fw): Select all Collapse
聽 聽@ 46, 55 ADD BUTTON oBtn4 GROUP oGr BITMAP "..\bitmaps\paste16.BMP" ;
聽 聽 聽SIZE 70, 20 PROMPT "Paste" 聽MOSTLEFT round ;
聽 聽 聽action pastes( oWnd )


function pastes( oWnd )
聽 聽 local oPanel
聽 聽 oPanel := TPanel():New(,,,, oWnd)
聽 聽 msginfo( "mm" )
聽 聽 oPanel:Hide()
聽 聽 msginfo( "mm" )
return




Uploaded with ImageShack.us
Saludos
Patricio

__________________________________________________________________
Version: Harbour 3.2.0dev (r1307082134),Compiler: Borland C++ 5.8.2 (32-bit)
PCode version: 0.3, FWH 13.2
http://www.sialm.cl
Posts: 1074
Joined: Fri Oct 07, 2005 01:56 PM
Re: Efecto no deseado en RIBBON Y TPANEL
Posted: Thu Apr 26, 2012 12:59 PM
Estimados

aqui esta el problema del pintado no deseado en la clase tPanel esta en ::setbrush(..), si lo saco funciona bien pero a la segunda se cae :-)

hay alguna forma de solucionarlo..

Code (fw): Select all Collapse
 聽 ::Register()

聽 聽if ! Empty( ::oWnd:hWnd )
聽 聽 聽 ::Create()
聽 聽 聽 ::oWnd:AddControl( Self )
聽 聽 聽 if ::oWnd:oBrush != nil
聽 聽 聽 聽 聽::SetBrush( ::oWnd:oBrush ) // este linea
聽 聽 聽 endif
聽 聽else
聽 聽 聽 ::oWnd:DefControl( Self )
聽 聽endif
Saludos
Patricio

__________________________________________________________________
Version: Harbour 3.2.0dev (r1307082134),Compiler: Borland C++ 5.8.2 (32-bit)
PCode version: 0.3, FWH 13.2
http://www.sialm.cl
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Efecto no deseado en RIBBON Y TPANEL
Posted: Thu Apr 26, 2012 05:58 PM

Patricio,

Es que estas creando un panel que es hijo de la ventana y es normal lo que obtienes.

Si quieres que ese panel sea hijo de la ventana, lo que tienes que hacer es cambiar el valor nTop del panel para que se muestre mas abajo de la ribbon.

Si nos explicas lo que deseas implementar podremos ayudarte mejor :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1074
Joined: Fri Oct 07, 2005 01:56 PM
Re: Efecto no deseado en RIBBON Y TPANEL
Posted: Fri Apr 27, 2012 02:39 PM
Gracias antonio por responder

te adjunto un video para que veas el efecto aunque no afecta en el funcionamiento de este..

http://imageshack.us/clip/my-videos/826/npi.mp4/
Saludos
Patricio

__________________________________________________________________
Version: Harbour 3.2.0dev (r1307082134),Compiler: Borland C++ 5.8.2 (32-bit)
PCode version: 0.3, FWH 13.2
http://www.sialm.cl
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Efecto no deseado en RIBBON Y TPANEL
Posted: Fri Apr 27, 2012 06:33 PM

Patricio,

La aplicaci贸n se ve muy linda, enhorabuena :-)

Veo que aparece el panel y luego desaparece, para que lo usas ? Lo pones en otra posici贸n luego ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1074
Joined: Fri Oct 07, 2005 01:56 PM
Re: Efecto no deseado en RIBBON Y TPANEL
Posted: Fri Apr 27, 2012 07:02 PM
Antonio:

lo ocupo para el xbrowse


Code (fw): Select all Collapse
 聽聽 oPanel := TPanel():New(,,,, oWnd)
聽 聽 oPanel:Hide()

聽 聽@ 0,0 XBROWSE oBrw OF oPanel 聽 聽 聽 聽 聽 聽 聽 聽 ;
聽 聽 聽 聽 聽FIELDS 聽 (cAliasTablas)->cod_tabla, ;聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 //1
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 (cAliasTablas)->Nom_tabla ; 聽 聽 聽 聽 聽聽 聽聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 //2
聽 聽 聽 聽 聽 聽 HEADERS "C贸digo", "Descripci贸n" ;
聽 聽 聽 聽 聽 聽 JUSTIFY AL_LEFT,AL_LEFT ;
聽 聽 聽 聽 聽ALIAS (cAliasTablas)聽 聽聽 聽 聽 聽 聽 聽 ;
聽 聽 聽 聽 聽 聽 CELL LINES AUTOSORT

聽 聽 WITH OBJECT oBrw
Saludos
Patricio

__________________________________________________________________
Version: Harbour 3.2.0dev (r1307082134),Compiler: Borland C++ 5.8.2 (32-bit)
PCode version: 0.3, FWH 13.2
http://www.sialm.cl
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Efecto no deseado en RIBBON Y TPANEL
Posted: Fri Apr 27, 2012 07:11 PM

Patricio,

Estas usando ventanas MDI ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1074
Joined: Fri Oct 07, 2005 01:56 PM
Re: Efecto no deseado en RIBBON Y TPANEL
Posted: Fri Apr 27, 2012 07:18 PM
Antonio:

NO, lo uso de este manera en el main principal

Code (fw): Select all Collapse
Function Main()

聽 聽local oRibbon
聽 聽 local oQbtn1, oQbtn2, oQbtn3
聽 聽local oQck, oBtn
聽 聽 local OmENU2, OiCO, oPanel, oItem
聽 聽 local hBorland

聽 聽 SetKey( VK_F6, { || VerPosibleError() } )

聽 聽SetBalloon( .T. )
聽 聽 hBorland := LoadLibrary( "SYSTEM\BWCC32.DLL" )
聽 聽 BWCCRegister(GetResources())
聽 聽 HB_LANGSELECT( 'ES' )

聽 聽DEFINE WINDOW oWnd TITLE "Sistema Administrativo Comercial"

聽 聽 oRibbon := BuildRibbonBar( oWnd )

//---------------------------------------------------------------------------------------------------------------*/
聽 聽 DEFINE QUICKBUTTON OF oRibbon ;
聽 聽 聽 聽 聽 BITMAP "c:\fwh\bitmaps\16x16\fivetech.bmp", "c:\fwh\bitmaps\btnqcka.bmp", "c:\fwh\bitmaps\btnqckb.bmp", "c:\fwh\bitmaps\btnqckc.bmp" ;
聽 聽 聽 聽 聽 ACTION AbreMenu( oWnd )

聽 聽DEFINE QUICKACCESS oQck OF oRibbon

聽 聽ADD BUTTON oQbtn1 QUICKACCESS oQck BITMAP "c:\fwh\bitmaps\16x16\floppy.bmp" 聽;
聽 聽 聽 聽ACTION MsgInfo("1")

聽 聽ADD BUTTON oQbtn2 QUICKACCESS oQck BITMAP "c:\fwh\bitmaps\16x16\closeall.bmp" 聽;
聽 聽 聽 聽ACTION MsgInfo("2")

聽 聽ADD BUTTON oQbtn3 QUICKACCESS oQck BITMAP "c:\fwh\bitmaps\16x16\additem.bmp" ;
聽 聽 聽 聽ACTION MsgInfo("3")

聽 聽ADD BUTTON oQbtn3 QUICKACCESS oQck BITMAP "c:\fwh\bitmaps\16x16\adddbf.bmp" ;
聽 聽 聽 聽ACTION MsgInfo("4")

聽 聽AEval( oQck:aButtons, {|o| o:bRClicked := {| nRow, nCol, nFlags, oBtn | MenuQuickDelete( oBtn, oQck ) } } )

聽 聽oRibbon:nSeparation( 4 )

聽 聽SET MESSAGE OF oWnd TO "Sistema Administrativo Comercial" NOINSET 2007 //CENTERED CLOCK KEYBOARD 2007
聽 聽 DEFINE MSGITEM oItem OF oWnd:oMsgBar SIZE 23 BITMAP "BTN_RESPALDO" TOOLTIP "Ver Usuarios en Linea" ACTION (MsgInfo("Ver Usuarios"))
聽 聽 DEFINE MSGITEM oItem OF oWnd:oMsgBar SIZE 23 BITMAP "BTN_SALIR" TOOLTIP "Activar Calendario" ACTION (FwCalendar())

聽 聽ACTIVATE WINDOW ownd MAXIMIZED

Return Nil
Saludos
Patricio

__________________________________________________________________
Version: Harbour 3.2.0dev (r1307082134),Compiler: Borland C++ 5.8.2 (32-bit)
PCode version: 0.3, FWH 13.2
http://www.sialm.cl
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Efecto no deseado en RIBBON Y TPANEL
Posted: Fri Apr 27, 2012 08:48 PM

Patricio,

Entiendo que usas un panel para situar el control izquierdo, un splitter un el browse a la derecha, si ?

Los tres sobre el panel, si ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Efecto no deseado en RIBBON Y TPANEL
Posted: Fri Apr 27, 2012 08:51 PM

Patricio,

Cambia esta l铆nea:

oPanel := TPanel():New(,,,, oWnd)

a:

oPanel := TPanel():New( 200, 0, 500, 500, oWnd)

cambia las coordenadas seg煤n te convenga :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1074
Joined: Fri Oct 07, 2005 01:56 PM
Re: Efecto no deseado en RIBBON Y TPANEL
Posted: Fri Apr 27, 2012 09:40 PM

Antonio:

Excelente estaba justo en eso.

muchas gracias

Saludos
Patricio

__________________________________________________________________
Version: Harbour 3.2.0dev (r1307082134),Compiler: Borland C++ 5.8.2 (32-bit)
PCode version: 0.3, FWH 13.2
http://www.sialm.cl

Continue the discussion