Page 1 of 1
DCTABPAGE with database
Posted: Thu Apr 08, 2010 10:16 am
by JanK
I have with function problem DCTABPAGE to in section chosen element "detail" be seen in section "Kontrahenci". In section "Detail" first record sees always from database "kontra" why.
Best Regards
Jan
Re: DCTABPAGE with database
Posted: Thu Apr 08, 2010 10:24 am
by rdonnay
I need more information.
I don't see anything in your source code that refers to "detail".
Re: DCTABPAGE with database
Posted: Thu Apr 08, 2010 12:11 pm
by JanK
Sorry, I added bad files.
Best Regards,
Jan
Re: DCTABPAGE with database
Posted: Fri Apr 09, 2010 7:03 am
by JanK
Sorry.
Solution of this problem is for me very important. Help me.
Jan (Jean)
Re: DCTABPAGE with database
Posted: Fri Apr 09, 2010 7:29 am
by rdonnay
Working with CRT windows and GUI windows can be very tricky.
Can you explain why you need this?
Re: DCTABPAGE with database
Posted: Fri Apr 09, 2010 12:11 pm
by JanK
I use two times DCTABPAGE. In first DCTABPAGE display object DCBROWSE ('Kontrahenci') , in second display the details of record chosen in object DCBROWSE ('Detail'). Unfortunately in 'Detail' always displayed details of first record of database, not details it chosen record from object DCBROWSE.
Why?
Best Regards
Jan (Jean)
Re: DCTABPAGE with database
Posted: Wed Apr 14, 2010 6:17 am
by rdonnay
You didn't answer my question. I need to understand why you must have an XbpCrt object on the 2nd tabpage.
Nobody ever writes Xbase++ programs this way because it is so tricky.
You can't just send a refresh event to a CRT window because it runs like a DOS window.
It would have to run in its own thread.
Why don't you use eXpress++ DC* commands to do what you want?
Re: DCTABPAGE with database
Posted: Wed Apr 14, 2010 12:32 pm
by JanK
In this example I do not it use CRT windows only Expres ++ DC.
Problem exists still.
Description of problem:
I use two times DCTABPAGE. In first DCTABPAGE display object DCBROWSE ('Kontrahenci') , in second display the details of record chosen in object DCBROWSE ('Detail'). Unfortunately in 'Detail' always displayed details of first record of database, not details it chosen record from object DCBROWSE.
Why?
Best Regards
Jan (Jean)
Re: DCTABPAGE with database
Posted: Wed Apr 14, 2010 10:02 pm
by Cliff Wiernik
I do this all the time. I set the ITEMSELECTED AND ITEMMARKED commands of the DCBROWSE to do something. For ITEMSELECTED, I say to process the hotkey to select 2nd tabpage. The DCTABPAGE for the 2nd browse has a GOTFOCUS clause that states, if moving from tabpage1, set tabpagenumber to 2, scatter the current record, then do a dcgetrefresh. The selection of the record in the browse does not automatically update the variables on the 2nd page. You have to tell the variables to update and then refresh the screen.
Cliff.
Re: DCTABPAGE with database
Posted: Thu Apr 15, 2010 12:47 pm
by rdonnay
If you could eliminate the need to have a CRT window on that tabpage, then I can help you with this.