FWH 16.12 : Display Seek values in Header Search Bar

FWH 16.12 : Display Seek values in Header Search Bar

Postby nageswaragunupudi » Thu Dec 22, 2016 3:39 am

Image

What is required is to set oBrw:lSeekBar := .t.

Source code:
Code: Select all  Expand view  RUN
#include "fivewin.ch"

REQUEST DBFCDX

function Main()

   local oDlg, oFont, oBrw

   USE CUSTOMER NEW VIA "DBFCDX"

   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
   DEFINE DIALOG oDlg SIZE 900,400 PIXEL FONT oFont TRUEPIXEL ;
      TITLE "FWH 16.12 : SEEK IN HEADER BAR"

   @ 20,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
      DATASOURCE "CUSTOMER" AUTOCOLS ;
      CELL LINES NOBORDER FOOTERS AUTOSORT

   WITH OBJECT oBrw
      :lSeekBar    := .t.
      :bClrEdits  := { || { CLR_HRED, CLR_YELLOW } }
      :CreateFromCode()
   END

   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont

return nil
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: FWH 16.12 : Display Seek values in Header Search Bar

Postby TimStone » Fri Dec 23, 2016 12:16 am

First, thank you for this option. It is a perfect solution and does work.

HOWEVER, I have encountered a very strange problem with this build. I have a Dialog with two folders. Each has a browse ( separate DBFs ). With 16.12, in each folder, the browse shows only the first header cell, and absolutely no data. Also, on the button bar, the prompts have disappeared.

The problem is only with Harbour and MSVC 2015. If I build with xHarbour ( xBuild commercial version ), it displays correctly.

Also, this is absolutely consistent in this dialog of the program, but is not yet showing up elsewhere where I have folders and xBrowse.\

Any ideas would be helpful.

Thanks.

Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: FWH 16.12 : Display Seek values in Header Search Bar

Postby nageswaragunupudi » Fri Dec 23, 2016 12:31 am

So is it happening with only one dialog in 16.12 MSVC 32 bits only? Working correctly with 16.11 MSVC 32 ?
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: FWH 16.12 : Display Seek values in Header Search Bar

Postby TimStone » Fri Dec 23, 2016 12:55 am

Yes ... very strange. I added the logical .t. and it started. Commented out the line and the problem remains. No problem on a single dialog with no folders. I haven't added the command elsewhere so I don't know if that will create problems there.

Reverting to 16.11 it works perfectly. Here is on browse control:

Code: Select all  Expand view  RUN

    REDEFINE  XBROWSE  oLBxcl ;
      DATASOURCE oClients  ;
      HEADERS "Account", "Client", "City", "Phone", "Cellular",  "Email", "Last Visti", "Total Sales", " " ;
      COLUMNS "acrnum", "clicom", "clicty", "clipho", "clicel", "clieml", "clidls", "acrytd", " "  ;
      ID 860 ;
      OF  oFldCSE:aDialogs[ 1 ];
      ON CHANGE  ( oClientsr:load(), oFldCSE:aDialogs[ 1 ]:update() )  ;
      ON DBLCLICK (  lCliScoped := oServiceUnits:ScopeUnits( oClientsr, lCliScoped ), oLbvm:refresh( ),;
            oServiceUnitsr:load( ), oFldCSE:aDialogs[2]:update( ),oFldCSE:setoption(2)   ) ;
      AUTOSORT UPDATE

    // Provide the header gradient and styles
    oLbxcl:bClrGrad := aPubGrad
    oLbxcl:nMarqueeStyle := MARQSTYLE_HIGHLROW
    oLbxcl:nColDividerStyle := LINESTYLE_RAISED
    oLbxcl:nRowDividerStyle := LINESTYLE_RAISED
    oLbxcl:nHeadStrAligns  := AL_CENTER
    oLbxcl:nStretchCol := STRETCHCOL_LAST

    // Use for incremental search on opened database
    oLbxcl:bSeek := { |c| oClients:Seek( Upper( c )) }
  // oLbxcl:lSeekBar := .t.

 
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: FWH 16.12 : Display Seek values in Header Search Bar

Postby nageswaragunupudi » Fri Dec 23, 2016 1:37 am

Can you please clarify:
Are you getting problem with "oLbxcl:lSeekBar := .t." or without?
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: FWH 16.12 : Display Seek values in Header Search Bar

Postby TimStone » Fri Dec 23, 2016 1:52 am

You made a number of changes in 16.12. Everything works perfectly in 16.11 ( still ). However, if I build with 16.12, I have the problem, with or without lSeekBar in the code. The problem occurs only when building with MSVC.

The problem ... the entire contents of the xbrowse ( except the frame ) are empty except cell 1:1, and also the fonts for the bitmap labels disappear.

I noticed in the code for xbrowse, you have a modification on fonts:

DATA aDataFont, aClrText // 2016-11-28 : Fonts & Color for multi-line

I'm wondering if something might change the fonts. I'm inheriting from the system fonts.

I saw numerous other fonts, but what is interesting is this. Cell 1:1 is highlighted ( but no data ). If I scroll down, the highlight bar moves down, although the screen appears to be blank. So it's as if, in MSVC, and Harbour, the font cannot display the content.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: FWH 16.12 : Display Seek values in Header Search Bar

Postby Antonio Linares » Sat Dec 24, 2016 8:46 am

Tim,

Please try to provide a self contained example to reproduce it, thanks
regards, saludos

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

Re: FWH 16.12 : Display Seek values in Header Search Bar

Postby nageswaragunupudi » Sat Dec 24, 2016 4:41 pm

Reverting to 16.11 it works perfectly. Here is on browse control:


The problem ... the entire contents of the xbrowse ( except the frame ) are empty except cell 1:1, and also the fonts for the bitmap labels disappear.


We tried our best trying several variations to recreate the problem mentioned by you but did not succeed. We could not build the sample posted by you exactly as it is for obvious reasons like we do not have the database or rc file. But we created a sample that closely resembles to characteristics of your sample

Code: Select all  Expand view  RUN

#include "FiveWin.ch"
#include "Folder.ch"

REQUEST DBFCDX

//----------------------------------------------------------------------------//

function Main()

   local oDlg, oFld, oCbx, oSay, oBrw, oDbf
   local nValue := 2, oChk, lChk := .t.
   local cItem, oImageList

   SET _3DLOOK ON

   USE CUSTOMER NEW SHARED ALIAS CUST VIA "DBFCDX"
   SET ORDER TO TAG FIRST
   GO TOP
   DATABASE oDbf


   DEFINE DIALOG oDlg RESOURCE "Test" TITLE FWVERSION + " : " + hb_compiler()

   REDEFINE FOLDER oFld ID 110 OF oDlg ;
      PROMPT "XBrowse", "Dummy" ;
      DIALOGS "Sub1"

   REDEFINE XBROWSE oBrw OF oFld:aDialogs[ 1 ] ID 801 ;
      DATASOURCE oDbf ;
      COLUMNS "First", "Last", "City" ;
      AUTOSORT CELL LINES

   WITH OBJECT oBrw
      :lSeekBar      := .t.
      :bClrEdits     := { || { CLR_HRED, CLR_YELLOW } }
   END


   ACTIVATE DIALOG oDlg CENTERED

return nil
 


rc file
Code: Select all  Expand view  RUN

#include <windows.h>

timbar DIALOG 0, 0, 400, 200
STYLE DS_MODALFRAME | WS_BORDER | WS_DLGFRAME | WS_POPUP | WS_SYSMENU
FONT 8, "MS Sans Serif"
CAPTION "Test"
BEGIN
   CONTROL "", 100, "TBar", 0 | WS_CHILD | WS_VISIBLE,   0, 0, 400, 40
   DEFPUSHBUTTON   "OK", IDOK, 40, 168, 50, 14, WS_VISIBLE
   PUSHBUTTON      "Cancel", IDCANCEL, 101, 168, 50, 14, WS_VISIBLE
   CONTROL "", 102, "TBtnBmp", 0 | WS_CHILD | WS_VISIBLE | WS_BORDER, 160, 160, 60, 30
   CONTROL "", 101, "TXBrowse", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 10, 50, 360, 100
END
 


This sample is working correctly with bcc7 xHarbour and Harbour as well as MSVC 64 and 32 bits and also BCC7164

Image

We shall be glad if you can modify the above program to reproduce the error
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: FWH 16.12 : Display Seek values in Header Search Bar

Postby TimStone » Sat Dec 24, 2016 5:15 pm

OK ... I will go back to this and work with it some more.

Antonio,

If you look at the code I posted it is exactly where I have the problem. As I said, it is very strange, but these facts are important:

1) The browse control displays perfectly in all builds using FWH 16.11 and previous copies. Reverting to FWH 16.11 and rebuilding confirmed this.
2) The browse control displays perfectly using FWH 16.12 when building with xHarbour ( .com version ).
3) The problem only occurs when building with FWH 16.12 and Harbour / MSVC.

This is part of a complex class for editing two databases, on two folders, within one dialog. When comparing xbrowse .11 and .12 I did note that the font display for the browse was changed. Since when I do the build, I also have a button bar on each folder, the prompts for those bars also disappear. I'm thinking the font somehow is being changed for these two controls ( button bar and xbrowse ) to an invisible color ( at least on this display. SAY and GET commands are not affected.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: FWH 16.12 : Display Seek values in Header Search Bar

Postby TimStone » Sat Dec 24, 2016 5:51 pm

Here is actual source code ... perhaps you can see something here that Is causing the problem.

The font's are drawn from the windows defaults, and not defined since they are all inherited

A dialog is created with one control ( tFolderEX ). There are two folder tabs created using child dialogs.

I have commented out lSeekBar, but the problem still exists. It still has the problem.

Code: Select all  Expand view  RUN

FROM THE RC

// This is the main dialog:
CLISVCw DIALOG 0, 0, 850, 460
STYLE WS_POPUP | WS_CAPTION
CAPTION "Client and Vehicle Services"
{
  CONTROL         "",1600,"TFolderex",WS_TABSTOP,10,5,830,450
}

//  This is the dialog for a folder:
EDITCLIw DIALOG 0,0, 845, 440
STYLE WS_CHILD | WS_VISIBLE
{
    CONTROL                 "", 101, "TBar", 0|WS_CHILD|WS_VISIBLE, 0,0, 840, 40
    CONTROL         "",860,"TxBrowse",WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,10,185,805,245
......  all other controls follow

}

 


From the .prg file, you can see the Dialog is created, calling the main dialog control with folders. Then one of the folders is defined ( there are actually two ).

Code: Select all  Expand view  RUN

// Here is the dialog creation:
DEFINE DIALOG oDlgCSE RESOURCE "CLISVCw" BRUSH oBrush TRANSPARENT OF oWnd

// Define the folder
        REDEFINE FOLDEREX oFldCSE ID 1600 OF oDlgCSE ;
        PROMPT "    &Client    ", "    "+aTit[1] + "    " ;
        DIALOGS "EDITCLIw", "EDITVEHw" ;
        ROUND 5 TRANSPARENT                            
    oFldCSE:aGradUnSel := { { 0.50,16776960,16777215 }, { 0.50,16777215,16776960 } }
    oFldCSE:aGradOverUnSel := { { 0.25, nRGB( 100, 149, 237 ), nRGB( 100, 149, 237 ) },{ 0.75,  16777215,16776960 } }           


// Define the control
    REDEFINE  XBROWSE  oLBxcl ;
      DATASOURCE oClients  ;
      HEADERS "Account", "Client", "City", "Phone", "Cellular",  "Email", "Last Visti", "Total Sales", " " ;
      COLUMNS "acrnum", "clicom", "clicty", "clipho", "clicel", "clieml", "clidls", "acrytd", " "  ;
      ID 860 ;
      OF  oFldCSE:aDialogs[ 1 ];
      ON CHANGE  ( oClientsr:load(), oFldCSE:aDialogs[ 1 ]:update() )  ;
      ON DBLCLICK (  lCliScoped := oServiceUnits:ScopeUnits( oClientsr, lCliScoped ), oLbvm:refresh( ),;
            oServiceUnitsr:load( ), oFldCSE:aDialogs[2]:update( ),oFldCSE:setoption(2)   ) ;
      AUTOSORT UPDATE

    // Provide the header gradient and styles
    oLbxcl:bClrGrad := aPubGrad
    oLbxcl:nMarqueeStyle := MARQSTYLE_HIGHLROW
    oLbxcl:nColDividerStyle := LINESTYLE_RAISED
    oLbxcl:nRowDividerStyle := LINESTYLE_RAISED
    oLbxcl:nHeadStrAligns  := AL_CENTER
    oLbxcl:nStretchCol := STRETCHCOL_LAST

    // Use for incremental search on opened database
    oLbxcl:bSeek := { |c| oClients:Seek( Upper( c )) }
  // oLbxcl:lSeekBar := .t.

// Activate the dialog
  ACTIVATE DIALOG oDlgCSE ON INIT ( oReBar:hide(),  oBarCL:lTransparent := .F.,  oBarVE:lTransparent := .F.) ;
    ON PAINT    oFldCSE:setoption(nType)  CENTERED





 
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: FWH 16.12 : Display Seek values in Header Search Bar

Postby Antonio Linares » Sat Dec 24, 2016 6:28 pm

Tim,

Please modify Rao's example to show the error, thanks
regards, saludos

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

Re: FWH 16.12 : Display Seek values in Header Search Bar

Postby nageswaragunupudi » Sun Dec 25, 2016 1:05 am

Adopting the code and rc provided by Mr Tim Stone:

Adopted code:
Code: Select all  Expand view  RUN
REQUEST DBFCDX

//----------------------------------------------------------------------------//

function Main()

   local oWnd, oBar, oClients

   USE CUSTOMER NEW SHARED VIA "DBFCDX"
   SET ORDER TO TAG FIRST
   GO TOP
   DATABASE oClients

   DEFINE WINDOW oWnd TITLE FWVERSION + " : " + hb_compiler()
   DEFINE BUTTONBAR oBar SIZE 100,32 2007
   DEFINE BUTTON OF oBar PROMPT "Dialog" CENTER ;
      ACTION ShowDialog( oClients )

   ACTIVATE WINDOW oWnd MAXIMIZED

return nil

//----------------------------------------------------------------------------//

function ShowDialog( oClients )

   local oDlgCSE, oFldCSE, oLBxcl, oBarCL, oBrush
   local oWnd := WndMain()
   local aTit := { "aTit[1]" }

// Here is the dialog creation:
   DEFINE BRUSH oBrush FILE "..\bitmaps\backgrnd\marble5.bmp"
   DEFINE DIALOG oDlgCSE RESOURCE "CLISVCw" BRUSH oBrush TRANSPARENT OF oWnd ;
      TITLE FWVERSION + " : " + hb_compiler()

// Define the folder
   REDEFINE FOLDEREX oFldCSE ID 1600 OF oDlgCSE ;
   PROMPT "    &Client    ", "    "+aTit[1] + "    " ;
   DIALOGS "EDITCLIw" ; //, "EDITVEHw" ;
   ROUND 5 TRANSPARENT

   oFldCSE:aGradUnSel := { { 0.50,16776960,16777215 }, { 0.50,16777215,16776960 } }
   oFldCSE:aGradOverUnSel := { { 0.25, nRGB( 100, 149, 237 ), nRGB( 100, 149, 237 ) },{ 0.75,  16777215,16776960 } }

   REDEFINE BUTTONBAR oBarCL ID 101 OF oFldCSE:aDialogs[ 1 ] 2007
   DEFINE BUTTON OF oBarCL FILE "..\bitmaps\32x32\quit.bmp" PROMPT "Close" ACTION oDlgCSE:End()

// Define the control
   REDEFINE  XBROWSE  oLBxcl ;
      DATASOURCE oClients  ;
      AUTOCOLS ;
      ; //HEADERS "Account", "Client", "City", "Phone", "Cellular",  "Email", "Last Visti", "Total Sales", " " ;
      ; //COLUMNS "acrnum", "clicom", "clicty", "clipho", "clicel", "clieml", "clidls", "acrytd", " "  ;
      ID 860 ;
      OF  oFldCSE:aDialogs[ 1 ];
      ; //ON CHANGE  ( oClientsr:load(), oFldCSE:aDialogs[ 1 ]:update() )  ;
      ; //ON DBLCLICK (  lCliScoped := oServiceUnits:ScopeUnits( oClientsr, lCliScoped ), oLbvm:refresh( ),oServiceUnitsr:load( ), oFldCSE:aDialogs[2]:update( ),oFldCSE:setoption(2)   ) ;
      AUTOSORT UPDATE

    // Provide the header gradient and styles
//   oLbxcl:bClrGrad := aPubGrad
   oLbxcl:nMarqueeStyle := MARQSTYLE_HIGHLROW
   oLbxcl:nColDividerStyle := LINESTYLE_RAISED
   oLbxcl:nRowDividerStyle := LINESTYLE_RAISED
   oLbxcl:nHeadStrAligns  := AL_CENTER
   oLbxcl:nStretchCol := STRETCHCOL_LAST

    // Use for incremental search on opened database
   oLbxcl:bSeek := { |c| oClients:Seek( Upper( c )) }
   oLbxcl:lSeekBar := .t.
   oLbxcl:bClrEdits := { || { CLR_HRED, CLR_YELLOW } }

// Activate the dialog
   ACTIVATE DIALOG oDlgCSE ;
      ; //ON INIT ( oReBar:hide(),  oBarCL:lTransparent := .F.,  oBarVE:lTransparent := .F.) ;
      ; //ON PAINT    oFldCSE:setoption(nType)
      CENTERED


return nil
 


Adopted RC
Code: Select all  Expand view  RUN
#include <windows.h>

CLISVCw DIALOG 0, 0, 850, 460
STYLE WS_POPUP | WS_CAPTION
CAPTION "Client and Vehicle Services"
{
  CONTROL         "",1600,"TFolderex",WS_TABSTOP,10,5,830,450
}

EDITCLIw DIALOG 0,0, 845, 440
STYLE WS_CHILD | WS_VISIBLE
{
    CONTROL                 "", 101, "TBar", 0|WS_CHILD|WS_VISIBLE, 0,0, 840, 40
    CONTROL         "",860,"TxBrowse",WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,10,185,805,245
}
 


Result:
Image

Modifications to the above program to recreate the problem will be highly appreciated.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: FWH 16.12 : Display Seek values in Header Search Bar

Postby joseluisysturiz » Sun Dec 25, 2016 8:01 pm

Lo prometió y lo cumplió...very good, han tomado en cuenta hacer esto..? saludos, gracias... :shock:

viewtopic.php?f=3&t=30302&p=173547#p173547


Simplemente ESPECTACULAR..!!!...esto le da una mejor estetica al xbrowse, ahora falta la buttonbar en footer, saludos...

viewtopic.php?f=6&t=29954&p=170411#p170411


y cuando puedas podras ver esto haber si es posible.?

viewtopic.php?f=6&t=33221&p=195842#p195842
Dios no está muerto...

Gracias a mi Dios ante todo!
User avatar
joseluisysturiz
 
Posts: 2064
Joined: Fri Jan 06, 2006 9:28 pm
Location: Guatire - Caracas - Venezuela

Re: FWH 16.12 : Display Seek values in Header Search Bar

Postby nageswaragunupudi » Sun Dec 25, 2016 10:48 pm

y cuando puedas podras ver esto haber si es posible.?

viewtopic.php?f=6&t=33221&p=195842#p195842


We just posted a sample in that thread. Hope that would be useful to you.

Other issues: We need some more time.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: FWH 16.12 : Display Seek values in Header Search Bar

Postby joseluisysturiz » Sun Dec 25, 2016 10:55 pm

nageswaragunupudi wrote:
y cuando puedas podras ver esto haber si es posible.?

viewtopic.php?f=6&t=33221&p=195842#p195842


We just posted a sample in that thread. Hope that would be useful to you.

Other issues: We need some more time.


Thank you, very good... :shock:
Dios no está muerto...

Gracias a mi Dios ante todo!
User avatar
joseluisysturiz
 
Posts: 2064
Joined: Fri Jan 06, 2006 9:28 pm
Location: Guatire - Caracas - Venezuela

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 45 guests