DCTABPAGE ... SUBCLASS "XbpImageTabPage()"

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
Tom
Posts: 1175
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

DCTABPAGE ... SUBCLASS "XbpImageTabPage()"

#1 Post 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}.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
rdonnay
Site Admin
Posts: 4733
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DCTABPAGE ... SUBCLASS "XbpImageTabPage()"

#2 Post by rdonnay »

Tom -

I will look into this.

Roger
The eXpress train is coming - and it has more cars.

User avatar
Tom
Posts: 1175
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: DCTABPAGE ... SUBCLASS "XbpImageTabPage()"

#3 Post by Tom »

:bow-yellow:
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
Tom
Posts: 1175
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: DCTABPAGE ... SUBCLASS "XbpImageTabPage()"

#4 Post 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! :)
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

skiman
Posts: 1186
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: DCTABPAGE ... SUBCLASS "XbpImageTabPage()"

#5 Post 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.
Best regards,

Chris.
www.aboservice.be

Cliff Wiernik
Posts: 605
Joined: Thu Jan 28, 2010 9:11 pm
Location: Steven Point, Wisconsin USA
Contact:

Re: DCTABPAGE ... SUBCLASS "XbpImageTabPage()"

#6 Post 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

User avatar
rdonnay
Site Admin
Posts: 4733
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DCTABPAGE ... SUBCLASS "XbpImageTabPage()"

#7 Post by rdonnay »

Tom -

Do you have any code you can share with us?

Roger
The eXpress train is coming - and it has more cars.

User avatar
Tom
Posts: 1175
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: DCTABPAGE ... SUBCLASS "XbpImageTabPage()"

#8 Post 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.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

skiman
Posts: 1186
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: DCTABPAGE ... SUBCLASS "XbpImageTabPage()"

#9 Post 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. :(
Best regards,

Chris.
www.aboservice.be

Post Reply