Page 1 of 1

Subordinate browsers

Posted: Mon Oct 21, 2024 1:09 pm
by Natter
Hi,

As I work, I need to subordinate one xbrowser to another. Is it possible to do this ?

Re: Subordinate browsers

Posted: Mon Oct 21, 2024 2:45 pm
by nageswaragunupudi
Please clarify.
You mean linked browses?

Re: Subordinate browsers

Posted: Mon Oct 21, 2024 5:43 pm
by paquitohm
Perhaps subordinate browses is a style of linked browse where browse number one shows parents and browse number two shows childs each parent

Re: Subordinate browsers

Posted: Mon Oct 21, 2024 6:07 pm
by Natter
There are 2 xBrowse - oBrw1 and oBrw2. I need to nest oBrw2 into oBrw1.

Code: Select all | Expand

SetParent(oBrw2:hWnd, oBrw1:hWnd)
I.e. I wanted to make a tree of nested xBrowse controls
However, nothing is working out :(

Re: Subordinate browsers

Posted: Mon Oct 21, 2024 8:05 pm
by nageswaragunupudi
Something like this?
If so it can be customized for your exact needs.

Image

code:

Code: Select all | Expand

function ParentChildBrw

   field CODE
   local oDlg, oChild

   USE CUSTOMER NEW SHARED VIA "DBFCDX"
   SET ORDER TO TAG STATE
   USE STATES NEW SHARED VIA "DBFCDX"
   SET RELATION TO CODE INTO CUSTOMER SCOPED
   GO TOP

   oChild  := XBROWSER "CUSTOMER" COLUMNS "STATE","CITY","SALARY" NOMODAL
   XBROWSER "STATES" SETUP ( oBrw:bChange := { || oChild:Refresh() } )

return nil

Re: Subordinate browsers

Posted: Mon Oct 21, 2024 9:11 pm
by Natter
Yeah, it looks like it.