Page 1 of 1
DCTABPAGE ... SUBCLASS "XbpImageTabPage()"
Posted: Thu Aug 26, 2010 4:43 am
by Tom
Did anyone try to use the new XbpImageTabPage class from the Alaska "Xbase-Parts-Pack # 1" as a subclass with DCTABPAGE? I get a tab page, but it's somewhere (not relative to the others, what it should be), it's empty and I get no icon inside the caption even with PREEVAL {|o|o:Image := oTabIcon}.
Re: DCTABPAGE ... SUBCLASS "XbpImageTabPage()"
Posted: Thu Aug 26, 2010 8:16 am
by rdonnay
Tom -
I will look into this.
Roger
Re: DCTABPAGE ... SUBCLASS "XbpImageTabPage()"
Posted: Thu Aug 26, 2010 8:46 am
by Tom
Re: DCTABPAGE ... SUBCLASS "XbpImageTabPage()"
Posted: Thu Sep 02, 2010 1:30 pm
by Tom
Hi, Roger.
Got it!
Im missed some references to ::XbpTabPage inside the class definition, and I had to add some parameters to the :Init-method. Looks like it's working now. Thanks anyway!

Re: DCTABPAGE ... SUBCLASS "XbpImageTabPage()"
Posted: Fri Sep 03, 2010 5:26 am
by skiman
Hi,
Are you using bottom tabpages. Since some time I have problems with the focus of them. I think since SL-1.
Example:
Top1Tab - Top2Tab - Top3Tab
Bottom1Tab - Bottom2Tab
If I start Top1Tab is active: OK.
Click on bottom1Tab: OK is working.
Click again on Top1Tab: nothing happens.
Click on Top2Tab: Tab 2 gets focus.
Click op Top1Tab: OK
Click on Bottom1Tab: nothing happens
Click on Bottom2Tab: OK.
So it seems as the focus stays on a top-tabpage if you click on a bootomTabPage. This way clicking again on the same TOP doesn't do anything. Same for the bottomTabPages.
Re: DCTABPAGE ... SUBCLASS "XbpImageTabPage()"
Posted: Fri Sep 03, 2010 5:51 am
by Cliff Wiernik
I have noticed that with SL1, sometimes I have to click twice for focus to change, especially with the X to close a window. Probably is something related in the behavior your are seeing with the tabpages. I might have seen something with just top tabpages, but do not recall it. I will keep this in mind.
Cliff
Re: DCTABPAGE ... SUBCLASS "XbpImageTabPage()"
Posted: Fri Sep 03, 2010 9:04 am
by rdonnay
Tom -
Do you have any code you can share with us?
Roger
Re: DCTABPAGE ... SUBCLASS "XbpImageTabPage()"
Posted: Mon Sep 06, 2010 1:42 am
by Tom
Hi, Roger.
There is not much code to share. I added the class XbpImageTabPage() from the "Xbase Parts Pack #1" to a sample project and used the subclass clause of DCTABPAGE. Inside the class definition, I changed all references from XbpTabPage to DC_XbpTabPage. Since pre- and postoffset still didn't work, I added this to every tabpage of the sample. I loaded icons using the XbpIcon-class and did this:
Code: Select all
@ 0,0 DCTABPAGE oTab2 RELATIVE oTab2 SUBCLASS 'XbpImageTabPage()' ;
EVAL {|o|o:SetImage(oIcon),SetCaption('Testing'),o:PreOffset := 10, o:PostOffset := 80} ...
(RELATIVE does not work, this clause is almost useless)
@Chris: The bottom tabpages do not work with visual styles. As you maybe noticed, they appear in a different layout than the top pages. The focus issue will vanish if you switch off use visual styles for
all tabpages on this dialog.
Re: DCTABPAGE ... SUBCLASS "XbpImageTabPage()"
Posted: Mon Sep 06, 2010 2:20 am
by skiman
Hi Tom,
I'm not using the visual style. The look of the top and bottom tabpages are too much different in that case. I decided to use them as before. They look identical.
Code: Select all
@ 0.1,0.1 DCTABPAGE aTabPages[1] TABWIDTH 18 CAPTION "~1. "+fMessage(4100) ;
SIZE 92 , 21 ACCELKEY xbeK_ALT_1 FONT amain(9,5) ;
GOTFOCUS {|| BuildGets(aTabPages,1,GetList,aBuildGets,aApp,oDialog),dc_getrefresh(getlist , , , ,"besteld") } ;
PARENT oDlg // ANGLE 20
// TABPAGE 2 //
@ 0,0 DCTABPAGE aTabPages[2] CAPTION "~2. "+fMessage(4200) ;
relative aTabPages[1] ACCELKEY xbeK_ALT_2 ;
GOTFOCUS {|| BuildGets(aTabpages,2,GetList,aBuildgets,aApp,oDialog),dc_getrefresh(getlist , , , ,"besteld") } ;
PARENT oDlg when {|| frights("ACEGDFH") }
.....
// first bottompage
@ 1.2,0.1 DCTABPAGE aTabPages[5] TABWIDTH 18 CAPTION "~5. "+if(amain(7,54),"Doc./Tradeplace",fMessage(2800)) ;
SIZE 92,21 FONT amain(9,5) ACCELKEY xbeK_ALT_5 ;
PARENT oDlg ;
TYPE XBPTABPAGE_TAB_BOTTOM ;
GOTFOCUS {|o| BuildGets(aTabpages,5,GetList,aBuildgets,aApp,oDialog) }
There is nothing special in it.
I would prefer a multi-layer tabpage, but I haven't seen a good solution with Xbase++.
I was hoping that I would have the possibility to use Codejock with it, but most of this is not working for 100% once it's added in a real application.
