GET for xBrowse

GET for xBrowse

Postby TimStone » Wed Sep 14, 2016 7: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: Select all  Expand view

    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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: GET for xBrowse

Postby cnavarro » Wed Sep 14, 2016 8:01 pm

Tim, you use oBrw:cSeek?

Code: Select all  Expand view


    @ 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
User avatar
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: GET for xBrowse

Postby TimStone » Wed Sep 14, 2016 8: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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: GET for xBrowse

Postby cnavarro » Wed Sep 14, 2016 8: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
User avatar
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: GET for xBrowse

Postby TimStone » Fri Sep 16, 2016 1: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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: GET for xBrowse

Postby nageswaragunupudi » Sat Sep 17, 2016 6:36 am

PRG:
Code: Select all  Expand view
#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: Select all  Expand view
#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:
Image
Regards

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

Re: GET for xBrowse

Postby TimStone » 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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: GET for xBrowse

Postby TimStone » Mon Sep 19, 2016 5: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
Last edited by TimStone on Wed Sep 21, 2016 4:47 pm, edited 2 times in total.
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: GET for xBrowse

Postby TimStone » Tue Sep 20, 2016 9: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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 99 guests