Possible to switch from Browser to Rec.-View in a Listbox?

Possible to switch from Browser to Rec.-View in a Listbox?

Postby ukoenig » Sun Feb 03, 2008 2:25 pm

Hello, from Germany

I want to switch from Browse-Mode
to Record-Mode to edit the selected
Record in a listbox.
The first browser is a < normal > browser
The 2. shows just 1 record with field- and type infos.

Picture :
http://www.pflegeplus.com/pictures/outlook.jpg

In the first Col, i want to show the fieldnames.
In the second Col, i want to edit the fields.
The Listbox needs to have a scrollbar.

That means, the MATRIX of the browser has to be different.
In a normal browser, you have for each var a col and
each record a row.
The browser i need, has to show just 1 record.
I need 1 col for the varnames and the second col
for the var-contents. In the browser, i want to skip
to another record.

In some DB-Tools, i have seen somthing like that.
I can put the Record-Informations in a 2 dimensional-Array.
It works, but i have so save the array back to the database.
Is there maybe another way, to create it directly with database-fields ?

Regards
Uwe :lol:
Last edited by ukoenig on Tue Feb 05, 2008 12:20 pm, edited 5 times 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

Postby Antonio Linares » Mon Feb 04, 2008 9:56 am

Uwe,

This will give you an idea about how to implement it:
Code: Select all  Expand view
METHOD SetEdit() CLASS TWBrowse

   ::bLogicLen = { || RecCount() * ( FCount() + 1 ) }
   ::cAlias = "_EDIT"

   ::Refresh()

return nil   

Code: Select all  Expand view
   do case
         case ::cAlias == "_EDIT"
            DbGoTop()
            DbSkip( Int( nRow / ( FCount() + 1 ) ) )
       nField = ( nRow + 1 ) % ( FCount() + 1 )
                 return If( nField == 0, If( nCol == 0, "-------------", "-------------------------------------" ),;
                 If( nCol == 0, FieldName( nField ), cValToChar( FieldGet( nField ) ) ) ) 

Code: Select all  Expand view
   @ 48, 20 LISTBOX oBrw FIELDS "", "" HEADERS "FieldName", "Value" ;
      OF oWnd SIZE 672, 363 ALIAS Alias()
regards, saludos

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

Postby Roger Seiler » Sat Feb 09, 2008 3:19 pm

Is this what you want?

- Roger

Image
User avatar
Roger Seiler
 
Posts: 223
Joined: Thu Dec 01, 2005 3:34 pm
Location: Nyack, New York, USA

Postby Rick Lipkin » Sat Feb 09, 2008 3:26 pm

Roger

I like your database tool .. would you mind sharing the code ?? I would like to adapt it to ADO for Sql Server ..

Thanks,

Rick Lipkin
lipkinrm29063@yahoo.com
User avatar
Rick Lipkin
 
Posts: 2628
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

DB-Tools as a public-project

Postby ukoenig » Sat Feb 09, 2008 4:18 pm

Hello, from Germany

I'm planning a project, all users of the forum can join.

The Tools will have a practical-section, that means,
to handle everything, what you need for database-administration.
As well, it is a sample, how all classes can work together :
xBrowse, Office2007, Outlook2003
Included, there will be a section, for tryouts of any problems.
For the moment, the tools are in German and English.
For other languages we need somebody for translation.

The actual release should be shown in the forum
like : DBTools_2_8.zip ( like FWH )
The Topic must have a Descripton of changes in the new release.

The Basics are nearly finished. I still have to do some cleanings
and the English-Translation.
With the time, it could be the answer of many questions.

Regards
Uwe König
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

Postby Manuel Valdenebro » Sat Feb 09, 2008 4:33 pm

It is a pleasure for me if I can colaborate for spanish translation.

Roger: Beatiful yours browse.
Un saludo

Manuel
User avatar
Manuel Valdenebro
 
Posts: 706
Joined: Thu Oct 06, 2005 9:57 pm
Location: Málaga-España

Postby Otto » Sat Feb 09, 2008 4:46 pm

Thanks to NageswaraRao we have a working sample for

Synchronization of row and redord browse with xBrowser

on

http://www.fwcodesnips.com

Regards,
Otto
User avatar
Otto
 
Posts: 6020
Joined: Fri Oct 07, 2005 7:07 pm

Postby Roger Seiler » Sat Feb 09, 2008 8:36 pm

Hi Rick,

Yes, glad to share my code for synchronizing a browse with a record-edit. Just click below to download a zip file with my stuff.

http://www.leadersoft.com/files/browedit.zip

And here is another screenshot with another version where I've synched a browse with folders in a companion record-edit dialog...

Image

This example is from our election campaign management software, and anyone selected from the browse of registered voters on the left gets their record data displayed in tabs on the right. One can edit data on either the browse or the tabs, and updates are synchronized between the displays. Also one can doubleclick on the column heading to change the index and reorder the browse display. Note the buttons in the lower middle whereby cell editing of a field in any column can be be set to exit either down or right. In this case, the "List" button displays another dialog for demographically selecting voters' names for mailing, "walking" and phoning lists, etc.

- Roger
User avatar
Roger Seiler
 
Posts: 223
Joined: Thu Dec 01, 2005 3:34 pm
Location: Nyack, New York, USA

Examples

Postby TimStone » Sat Feb 09, 2008 9:29 pm

Here is the way I handle it in a regular program ...

Image

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: 2904
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Listbox in xBrowse for 1 Record

Postby ukoenig » Sun Feb 10, 2008 12:46 pm

Hello Roger,

Your sample looks very nice.
When you open a unknown database,
you don't have a resource with the placed fields.
For your inhouse-software you create one.
For a DB-Tool, it is the only way, to create a Browser
together with a Listbox for the selected record
when you want to see the field-informations.
I have seen a tool DBADMIN ( it is done with Visual-Object )
There, they go to edit-mode for a single record
in a extra dialog with no field-Information and no
connection with the main-browser.
Like it is shown in your sample, it is much better
to handle.

Greetings from Germany
Uwe
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

Postby Roger Seiler » Tue Feb 12, 2008 7:44 pm

Glad you like it, Uwe.

Hopefully, you can adapt some of the concepts to do what you want to do, regardless of which browse tool you are using. Though I'm using a much advanced version of Tcbrowse, Tsbrowse is close enough to it that these concepts should be easy to implement there.

Good luck!

- Roger
User avatar
Roger Seiler
 
Posts: 223
Joined: Thu Dec 01, 2005 3:34 pm
Location: Nyack, New York, USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 15 guests