FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour GET for xBrowse
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
GET for xBrowse
Posted: Wed Sep 14, 2016 07:57 PM
Using xBrowse, the following code works in this way:
1) Click on a column header, and the index for that column is activated, and a ^ shows in the header
2) Start typing and the highlight bar moves down the browse searching incrementally.

This is exactly how we want it to work.

Code (fw): Select all Collapse
    REDEFINE  XBROWSE  oLBvm ;
      DATASOURCE oServiceUnits  ;
      HEADERS sLbl[1], "Client", "Account", sLbl[2], "Year", "Make", "Model", "SubModel", " ";
      COLUMNS "vehlic", "clicom", "acrnum", "vehidn", "vehyer", "vehmak", "vehmod", "vehsmd", " "  ;
      ID 885 OF  oFldCSE:aDialogs[ 2 ];
      ON CHANGE  ( oServiceUnitsr:load(), oFldCSE:aDialogs[ 2 ]:update()) ;
      ON DBLCLICK ( oClients:setorder(1), oClients:seek( oServiceUnitsr:acrnum), oClientsr:load( ),  oFldCSE:aDialogs[1]:update(),oFldCSE:setoption(1) ) ;
      AUTOSORT UPDATE 

    // Use for incremental search on opened database
    oLbvm:bSeek := { |c| oServiceUnits:Seek( Upper( c )) }


The problem is that my clients feel they are "typing blind". They want a get field to see what they are typing, and to be able to backspace to make changes.

Suggestions on how to do this ?

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
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: GET for xBrowse
Posted: Wed Sep 14, 2016 08:01 PM
Tim, you use oBrw:cSeek?

Code (fw): Select all Collapse
    @ 5, 145 SAY oSeek PROMPT oBrw:cSeek SIZE 140, 20 ;  // PICTURE "XXXXXXXXXX"
      PIXEL oF oBarFl1 COLOR  CLR_BLUE, CLR_WHITE ;
      BORDER TRANSPARENT UPDATE


or

viewtopic.php?f=3&t=32347#p189732
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: GET for xBrowse
Posted: Wed Sep 14, 2016 08:11 PM

I will work with that ... but I'm using the button bar in the resource ... so it can be a bit more challenging.

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
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: GET for xBrowse
Posted: Wed Sep 14, 2016 08:25 PM
TimStone wrote:I will work with that ... but I'm using the button bar in the resource ... so it can be a bit more challenging.

Tim


Sorry, I do not understand
Not problem with redefine say
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: GET for xBrowse
Posted: Fri Sep 16, 2016 01:01 AM

Nope ... returns a no exported method for cseek ( or bseek, or c which appears to be the keyboard buffer in that piece of code ).

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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: GET for xBrowse
Posted: Sat Sep 17, 2016 06:36 AM
PRG:
Code (fw): Select all Collapse
#include "fivewin.ch"

REQUEST DBFCDX

function main()

   local oDlg, oBar, oFont, oBrw

   USE CUSTOMER NEW SHARED ALIAS CUST VIA "DBFCDX"

   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14

   DEFINE DIALOG oDlg RESOURCE "timbar" TITLE FWVERSION FONT oFont

   REDEFINE BUTTONBAR oBar ID 100 OF oDlg 2013

   DEFINE BUTTON OF oBar PROMPT "Add"     FILE "c:\fwh\bitmaps\32x32\new.bmp"
   DEFINE BUTTON OF oBar PROMPT "Edit"    FILE "c:\fwh\bitmaps\32x32\edit.bmp"
   DEFINE BUTTON OF oBar PROMPT "Delete"  FILE "c:\fwh\bitmaps\delete.bmp"     GROUP
   DEFINE BUTTON OF oBar PROMPT "Print"   FILE "c:\fwh\bitmaps\print32.bmp" GROUP
   DEFINE BUTTON OF oBar PROMPT "Quit"    FILE "c:\fwh\bitmaps\32x32\exit.bmp" GROUP ACTION oDlg:End()

   REDEFINE XBROWSE oBrw ID 101 OF oDlg DATASOURCE Alias() AUTOCOLS AUTOSORT FOOTERS

   REDEFINE SAY oBrw:oSeek VAR oBrw:cSeek ID 4002 OF oDlg COLOR CLR_HRED,CLR_YELLOW

   ACTIVATE DIALOG oDlg CENTERED

   RELEASE FONT oFont

return nil


RC:
Code (fw): Select all Collapse
#include <windows.h>
#include <commctrl.h>
#include <richedit.h>

LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US

TIMBAR DIALOG DISCARDABLE 0, 0, 448, 216
STYLE WS_POPUP|DS_MODALFRAME|WS_CAPTION|WS_SYSMENU
EXSTYLE WS_EX_CLIENTEDGE|WS_EX_TRANSPARENT
CAPTION "Test"
FONT 8, "MS Sans Serif"
{
  CONTROL "", 100, "TBar", 0x00000000, 0, 0, 448, 40
  CONTROL "OK", IDOK, "Button", BS_DEFPUSHBUTTON|WS_TABSTOP, 316, 184, 50, 20
  CONTROL "Cancel", IDCANCEL, "Button", WS_TABSTOP, 380, 184, 50, 20
  CONTROL "", 101, "TXBrowse", WS_TABSTOP, 12, 80, 416, 84
  CONTROL "cSeek", 4002, "Static", WS_GROUP, 40, 52, 356, 16, WS_EX_CLIENTEDGE
}


Screen Shot:
Regards



G. N. Rao.

Hyderabad, India
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: GET for xBrowse
Posted: Sat Sep 17, 2016 11:10 PM

Thank you. I will work with it and report back.

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
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: GET for xBrowse
Posted: Mon Sep 19, 2016 05:57 PM

Thank you.

What if I wanted to do this in xBrowse using the new first row option you have to display "filters". In other words, when I click on a column in the header, it would be nice for the first row of that column to show a "field" that displays the keystrokes I'm entering for an incremental search. If I click a different column, it then displays the input in the first row of that column.

Thoughts on this ? Maybe it would be best as a method of the xBrowse itself that allows us to have this display when the incremental search is used.

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
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: GET for xBrowse
Posted: Tue Sep 20, 2016 09:42 PM

Let me ask this again:

It seems a natural use of the "get in the first row" option is to use it with the incremental search. Because this is all built into the class, I would think this ability should be activated in the class.

Here is how it should work ( and maybe this can already be done )

1) Click on a header for a column
2) Open up a get in the first row of the browse in that column
3) Start typing ( for incremental search ) and the results of what is being input shows in the get at the top of the column.
4) Click on a different indexed column and the previous get closes, the order refreshes, and then a get opens in the top row of the newly selected column.

All of this happens now, except for the opening of the Get for the column.

How can I do this with current xBrowse code, or how should the class be modified to accommodate this capability.

The reason is important. Right now we just start typing for an incremental search in an xbrowse, but our clients cannot see what they have entered. We can add a new field ( as discussed earlier in this thread ), and that does work, but it is confusing because the client often doesn't know which column has been selected, and the actual typed data is not physically near the selected column.

Yes, customers are complaining.

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

Continue the discussion