ExplorerBar and Get

ExplorerBar and Get

Postby Patrizio » Tue Jul 19, 2011 11:09 am

Hi, I'm trying to remove vTaskBar and use ExplorerBar in my app.

I've see a strange behavior with ExplorerBar and a TGet: if you write in TGet and move the mouse the TGet lost the value. :shock:

Small example: write what do you want in the get and then move the mouve over the title of the panel.

Code: Select all  Expand view
#include "FiveWin.ch"

PROC Main()
   LOCAL cText := Space(30)
   LOCAL oWnd, oExpBar, oPanel, oGet
   DEFINE WINDOW oWnd TITLE "Test"
   oExpBar              := TExplorerBar():New( 60, 10, oWnd:nWidth, 100, oWnd )
   oPanel               := oExpBar:AddPanel("Panel")
   oPanel:lSpecial      := .T.
   @ 40,10 GET oGet VAR cText OF oPanel PIXEL SIZE oPanel:nWidth - 20,18
   oWnd:oClient         := oExpBar
   ACTIVATE WINDOW oWnd
RETURN
 
Patrizio
 
Posts: 90
Joined: Wed Nov 07, 2007 8:56 am
Location: Italy

Re: ExplorerBar and Get

Postby ukoenig » Tue Jul 19, 2011 12:37 pm

Patrizio,

My Solution looks a little bit different and complicated.

to make it possible, to add any Control to a explorerbar :
1. I embedded VTitles to the panels ( adjusted ).
2. The needed Controls are defined inside the VTitles

That works for me without any Problems.

The Screenshot shows :
2 connected Explorerbars with different Panel-backgrounds

3 Gets defined in Section 3 ( Explorerbar 2) :
Image

A BTNBMP- and Text-Sample from Explorerbar 1 the 1. Button :
-----------------------------------------------------------------------------------------------------------

oBar1 := TExplorerBar():New( 0, aRect4 - nFACTOR1, aRect4 + nFACTOR2, aRect3 - 75, oWnd )

oPanel1 := oBar1:AddPanel("System", , 410 )
oPanel1:lSpecial := .T. // aktive Kopfleiste
oPanel1:SetFont ( oFont1 )

@ 25, -20 TITLE oTitle1 SIZE 120, 500 of oPanel1 NOBORDER SHADOW BOTTOMRIGHT
oTitle1:aGrdBack := { { 0.87,8388608,16046754 }, { 0.87,16046754,8388608 } }
oTitle1:lRound := .F.

@ 10, 45 BTNBMP oBtn30 OF oTitle1 ;
SIZE 48, 35 ;
LEFT ;
FILE c_path + "\Images\Preview.BMP" 2007 ;
ACTION ( IIF( lACTIVATE[1] = .T., ( oDlg1:End(), lACTIVATE[1] := .F. ), NIL ), ;
SHOW_FLD1(oWnd, oFont2, oFont3) )
oBtn30:cTooltip := { "Show" + CRLF + ;
"TFolderEx-Dialog","Preview", 1, CLR_BLACK, 14089979 }

@ 50, 35 TITLETEXT OF oTitle1 TEXT "TFolderEx" FONT oFont2 COLOR 65535

Best Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: ExplorerBar and Get

Postby Patrizio » Wed Jul 20, 2011 10:48 am

Uwe, thank's for the reply.

I've tried with VTitles.

With SAY and GET the controls are not correctly designed:

Code: Select all  Expand view
#include "FiveWin.ch"
#include "TTitle.ch"

PROC Main()
   LOCAL cText := Space(30)
   LOCAL oWnd, oExpBar, oPanel, oGet
   LOCAL oTitle
   DEFINE WINDOW oWnd TITLE "Test"
   oExpBar              := TExplorerBar():New( 60, 10, oWnd:nWidth, 100, oWnd )
   oPanel               := oExpBar:AddPanel("Panel")
   oPanel:lSpecial      := .T.
   @ 25, 0 TITLE oTitle SIZE oPanel:nWidth, 51 OF oPanel NOBORDER TRANSPARENT
   oTitle:lRound        := .F.
   @ 20,10 SAY "Say" OF oTitle TRANSPARENT PIXEL
   @ 20,70 GET oGet VAR cText OF oTitle PIXEL SIZE oTitle:nWidth - 80,18
   oWnd:oClient         := oExpBar
   ACTIVATE WINDOW oWnd
RETURN


Image

With TITLETEXT and GET I see a not correct top border of the GET

Code: Select all  Expand view
#include "FiveWin.ch"
#include "TTitle.ch"

PROC Main()
   LOCAL cText := Space(30)
   LOCAL oWnd, oExpBar, oPanel, oGet
   LOCAL oTitle
   DEFINE WINDOW oWnd TITLE "Test"
   oExpBar              := TExplorerBar():New( 60, 10, oWnd:nWidth, 100, oWnd )
   oPanel               := oExpBar:AddPanel("Panel")
   oPanel:lSpecial      := .T.
   @ 25, 0 TITLE oTitle SIZE oPanel:nWidth, 51 OF oPanel NOBORDER TRANSPARENT
   oTitle:lRound        := .F.
   @ 20,10 TITLETEXT          OF oTitle TEXT "Title"
   @ 20,70 GET oGet VAR cText OF oTitle PIXEL SIZE oTitle:nWidth - 80,18
   oWnd:oClient         := oExpBar
   ACTIVATE WINDOW oWnd
RETURN


Image

I don't understand why i must use a VTITLE nested in PANEL for add controls to PANEL. Is it a bug of the panel and this way it's only a workaround?
Patrizio
 
Posts: 90
Joined: Wed Nov 07, 2007 8:56 am
Location: Italy

Re: ExplorerBar and Get

Postby ukoenig » Wed Jul 20, 2011 11:45 am

Patrizio,

I think, TExplorerbar is not designed, to support all Controls.
I will create a new Sample, that will include different Solutions.

Like the Screenshot shows, Say and Get works fine nothing happens, selecting a Menuitem.
Other Controls, I will include in the sample.
I tested with a Dialog, but that doesn't work.
As soon it is finished, I will add the Download-link.

Image

Image

Best Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: ExplorerBar and Get

Postby Patrizio » Wed Jul 20, 2011 4:06 pm

Umh, Uwe what version of FiveWin do you use?

I build my test with FWH 11.06, xHarbour.org 1.21.9376 and MSCV2008.
Patrizio
 
Posts: 90
Joined: Wed Nov 07, 2007 8:56 am
Location: Italy

Re: ExplorerBar and Get

Postby ukoenig » Wed Jul 20, 2011 4:42 pm

Patrizio,

still using Version 10.9.
No changes of Class VTitles since this Version.
( the sample is nearly finished )

Another Test :
added TBtnBmp and TSelex ( some more Control-tests will follow )

Image

hiding Controls :

Image

Some more Control-tests.
I noticed Radio and Checkbox TRANSPARENT, works only with the library
SBUTTON from Manuel Mercado. Are You planning to include Radios and Checkboxes ?

Image

Best Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: ExplorerBar and Get

Postby Patrizio » Thu Jul 21, 2011 11:02 am

Uwe, now i need use only say, get, tbtnbmp and urllink and I don't use Manuel Mercado's lib.
Patrizio
 
Posts: 90
Joined: Wed Nov 07, 2007 8:56 am
Location: Italy

Re: ExplorerBar and Get

Postby ukoenig » Thu Jul 21, 2011 12:40 pm

Patrizio,

these tests are already included.
I working on a all-in-one Solution, to what might be useful.
I think, still more things are possible.
The 3. Explorerbar shows, how to update a Panel with Infos ( selections ) from another Panel.

Image

Best Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: ExplorerBar and Get

Postby Patrizio » Thu Jul 21, 2011 4:30 pm

Uwe, i've found the problem :|

Code: Select all  Expand view
#include "FiveWin.ch"
#include "TTitle.ch"

PROC Main()
   LOCAL cText := Space(30)
   LOCAL oWnd, oExpBar, oPanel, oGet
   LOCAL oTitle
   DEFINE WINDOW oWnd TITLE "Test"
   oExpBar              := TExplorerBar():New( 60, 10, oWnd:nWidth, 100, oWnd )
   oPanel               := oExpBar:AddPanel("Panel")
   oPanel:lSpecial      := .T.
   @ 25, 0 TITLE oTitle SIZE oPanel:nWidth, 51 OF oPanel NOBORDER TRANSPARENT
   oTitle:lRound        := .F.
   @ 20,10 TITLETEXT          OF oTitle TEXT "Title"
   @ 20,70 GET oGet VAR cText OF oTitle PIXEL SIZE oTitle:nWidth - 80,18
   oWnd:oClient         := oExpBar
   ACTIVATE WINDOW oWnd
RETURN


If the get have a height of 20 insted of 18 it will be design correctly.
Patrizio
 
Posts: 90
Joined: Wed Nov 07, 2007 8:56 am
Location: Italy

Re: ExplorerBar and Get

Postby ukoenig » Thu Jul 21, 2011 5:31 pm

Patrizio,

@ 40, 30 GET oGet1 VAR cget1 OF oTitle1 SIZE 100, 25 PIXEL FONT oSysFont UPDATE
// Get the needed Hight for the Get from Fontsize
// @ 40, 30 GET oGet1 VAR cget1 OF oTitle1 SIZE 100, oSysFont:nInpHeight + 5 PIXEL FONT oSysFont UPDATE

The Product-selection / preview works, but there is still something wrong, destroying the old Selection.
I will still add a Product-Zoom-preview in a extra Dialog.
Radios, Checkbox, Combobox, Sliders and xBrowse can be defined directly inside aPanel.

the promised Samples :

Download ( 2 MB )
http://www.pflegeplus.com/fw_downloads/explbar1.zip

Image

Another funny Solution : using the Vtitle as a rounded 3D-gradient-frame for the Get :

Image

Change the 1. Sample :

Code: Select all  Expand view


YOU HAVE TO ADD <  oTitle1A  > TO THE LOCAL VARS !!!!

//------ Panel 1 ------------

oPanel1 = oExBar1:AddPanel( "Vert. splitting, BtnBmp, Get, Say", c_Path+ "\Bitmaps\people.bmp", 150 )
oPanel1:AddLink( "First item", bClick, c_Path+ "\Bitmaps\additem.bmp" )
oPanel1:AddLink( "Second item", bClick, c_Path+ "\Bitmaps\copy.bmp" )
oPanel1:lSpecial = .T.
oPanel1:SetFont ( oSysFont )

//  top  left                           width height
@ 35, 130  TITLE oTitle1A SIZE 110, 20 of oPanel1 NOBORDER  SHADOWSIZE 0
oTitle1A:lTransparent := .T.

@ 2, 2 TITLETEXT oText1 OF oTitle1A TEXT "Testing GET"  FONT oSysFont COLOR 0 // 16046754

@ 60, 130  TITLE oTitle1 SIZE 110, 35 of oPanel1 NOBORDER  SHADOWSIZE 0
oTitle1:lTransparent := .F.

oTitle1:aGrdBack := { { 0.87,8388608,16046754 }, { 0.87,16046754,8388608 } }
oTitle1:lRound := .T.

@ 5, 5 GET oGet1 VAR cget1  OF oTitle1 SIZE 100, 25 PIXEL FONT oSysFont UPDATE

@ 110, 130 BTNBMP oBtn1 OF oPanel1  ;
SIZE 110, 50 PIXEL 2007 ;
NOBORDER ;
PROMPT " Exit" ;
FILENAME c_path + "\Bitmaps\Quit.Bmp" ;
ACTION ( oWnd:End() ) ;
FONT oSysFont ;
LEFT
oBtn1:lTransparent := .t.  
oBtn1:cToolTip =  { "Quit " + CRLF + "ExplorerBar","EXIT", 1, CLR_BLACK, 14089979 }
oBtn1:SetColor( 0, )

oPanel1:Move( 20 )
 


Best Regards
Uwe :lol:
Last edited by ukoenig on Fri Jul 22, 2011 2:07 pm, edited 1 time in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: ExplorerBar and Get

Postby Patrizio » Fri Jul 22, 2011 8:13 am

Many thanks Uwe :)
Patrizio
 
Posts: 90
Joined: Wed Nov 07, 2007 8:56 am
Location: Italy

Re: ExplorerBar and Get

Postby ukoenig » Fri Jul 22, 2011 2:09 pm

Patrizio,

the new Update with a working Product-selection, the Frames on Gets and some changes :

Download ( 1.9 MB )
http://www.pflegeplus.com/fw_downloads/explbar2.zip

Image

Best Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: ExplorerBar and Get

Postby ukoenig » Sun Jul 24, 2011 9:24 am

A Update using the Slider to Zoom a Product.
The Dialog-size is calculated from the Image-size and Zoom-factor.
Autoclose of the Dialog-preview, changing the Product or Zoom-factor.
Detailed Product-info on Image-click.
Image-size ( zoomed ) shown on Dialog-title.

Download ( 1.9 MB )
http://www.pflegeplus.com/fw_downloads/explbar2.zip

Image

Best Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 33 guests