How to bind an object to a xBrowser?

Post Reply
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

How to bind an object to a xBrowser?

Post by Otto »

How can I display the selected value during scrolling up and down a xBrowser with the Up and down keys?
User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Browser

Post by TimStone »

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
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Post by Otto »

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
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Otto,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Post by Otto »

Thank you.

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

Post by James Bott »

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
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Post by Otto »

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
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

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
Post Reply