Xbrowse manager for multiple browsers

Xbrowse manager for multiple browsers

Postby Marc Venken » Fri Nov 06, 2020 10:27 am

I'm looking into 2 options for managing a large database (many fields) from Xbrowse

Because the screen can show only x colums, option 1 is to work with several folders each with his own xbrowse colums and the same dbf.

I'm more interested in optioin 2

Xbrowse manager :

Having a manager.dbf with layouts defined by the large Xbrowse of the dbf.

Info : Global
Fields : All fields..

info : Basic Info
Fields : Name, Adress

info : Media
Fields : Website, email, phone

info : Statistics
Fields : Year, Jan, feb, Mrt,...

So I start with Xbrowse and ALL fields, select the fields that i want for this process and save the state of these field in the manager.dbf
And this can be done for all setups that I want. I think that this way with less programming much can be done.

Question : Will Xbrowse show a error if I start the next time with a selected setup (ex. Basic info.. Name, Adress) but in the code that will hold all the setup options for ALL settings there are :

oBrw:statistic1 ....
oBrw:datum ....

These options are used in a other setup... Will it be ok for Xbrowse ?

Mr. Rao : Could you have a basic setup for the function i talked here ? Than I can use it as a starting point.

Thanks..
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1355
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Xbrowse manager for multiple browsers

Postby Marc Venken » Fri Nov 06, 2020 12:07 pm

I found this code from Mr. Rao.

Maybe a better solution is to show a xbrowse or Combo with a simple title and the saved setupfiles in place of a Xbrowse with details like above ?

Code: Select all  Expand view

#include "fivewin.ch"

function Main()

   local oWnd, oBrw, oIni

   INI oIni FILE "savestat.ini"

   USE CUSTOMER NEW SHARED

   DEFINE WINDOW oWnd
   @ 0,0 XBROWSE oBrw OF oWnd DATASOURCE Alias() AUTOCOLS ;
      CELL LINES NOBORDER
   oBrw:CreateFromCode()
   oWnd:oClient   := oBrw

   ACTIVATE WINDOW oWnd ;
      ON INIT ( oWnd:RestoreState( oIni:Get( "states", "window", "" ) ), ;
                oBrw:RestoreState( oIni:Get( "states", "browse", "" ) )  ) ;
      VALID   ( oIni:Set( "states", "window", oWnd:SaveState() ), ;
                oIni:Set( "states", "browse", oBrw:SaveState() ), ;
                .T. )

return nil
 
 
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1355
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium


Return to FiveWin for Harbour/xHarbour

Who is online

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