How to bind an object to a xBrowser?

How to bind an object to a xBrowser?

Postby Otto » Tue Nov 27, 2007 12:10 am

How can I display the selected value during scrolling up and down a xBrowser with the Up and down keys?
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Browser

Postby TimStone » Tue Nov 27, 2007 12:26 am

Otto,

I have many screens where I have a list on the bottom half of the dialog and the edit boxes on the top. As the browser moves up and down through the database, the data changes in the edit controls.

The process is simple ( if this is what you are asking ). Simply mark all the controls UPDATE and do a ON CHANGE oDlg:update() on the browser control.

I have it even simpler because I use data objects ( James tData is a class derived from, and supplementing, tDatabase ). Speed is quite nice. I like it much better then the windows method of using a popup to display an edit dialog.

I hope this was the question you were asking.

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

Postby Otto » Tue Nov 27, 2007 5:50 am

Hello Tim,

Thank you for your answer. I can’t find bChange in the data declaration of xbrowse nor in the 'new method' or a
ON CHANGE clause in the ch-files for xbrowse and the manual.
Therefore I thought oBrow:bChange could not work.

Have you seen my little tool to browse through the Fivewin demos? I would like exactly this behavior you describe:

>I have many screens where I have a list on the bottom half of the dialog and the edit boxes on the top. As the browser moves up and down through the database, the data changes in the edit controls.



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

Postby Antonio Linares » Tue Nov 27, 2007 9:05 am

Otto,

You can use oXBrowse:bChange = { || ... }
regards, saludos

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

Postby Otto » Tue Nov 27, 2007 11:38 am

Thank you.

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

Postby James Bott » Tue Nov 27, 2007 4:33 pm

Otto,

>I can’t find bChange in the data declaration of xbrowse nor in the 'new method' or a ON CHANGE clause in the ch-files for xbrowse and the manual.

Don't forget that classes may inherit from another class. TXbrowse inherits from TControl and TControl inherits from TWindow, so you need to check all three classes when you are looking for a var or method.

Did you ever get the TData lib compiled?

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Otto » Tue Nov 27, 2007 7:25 pm

Hello James,
I am finishing converting my clipper/fivewin main application to Harbour/Fivewin.

That is more work than I thought. So much “litter” in all those years inside my program.

We have to make so many changes under time pressure.

But I am very happy with the new FHW – WINHOTEL program.

Therefore I didn’t start changing to your class yet.
I have it and as soon as I have some time I start changing.
Regards,
Otto
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Postby James Bott » Wed Nov 28, 2007 4:33 am

Otto,

>I am finishing converting my clipper/fivewin main application to Harbour/Fivewin.
...
>Therefore I didn’t start changing to your class yet.

It sounds like the best way to do it.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 59 guests