TBAR ChangeBitMap method not found

Post Reply
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

TBAR ChangeBitMap method not found

Post by nageswaragunupudi »

Mr Antonio

RPreview's method TwoPages calls oBar's changebitmap method. Though Toolbar class has changebitmap method, Tbar class does not have that method.
So when the user preses the twopage button he gets the error that this method is not found.

Kindly provide a fix please.
Regards

G. N. Rao.
Hyderabad, India
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

NageswaraRao,

Fixed. In source\classes\rpreview.prg change twice:

if ! IsAppThemed()

into

if ! IsAppThemed() .or. Upper( ::oBar:ClassName() ) == "TBAR"

Thanks!
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Post by nageswaragunupudi »

Thanks for the fix.

Sightly off topic. Do you advise replacing isAppThemed() with ( isAppThemed() and IsThemeActive() ) in general at all the places in the library?
Regards

G. N. Rao.
Hyderabad, India
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

NageswaraRao,

We could internally modify IsAppThemed() to make both calls, if required

But first we need to decide whats the desired behavior
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Post by nageswaragunupudi »

I thought about this. Themed graphics should be presented only if the user is seeing an application in themes otherwise not. Therefore I think the themed code should work if the application is finally showing a thremed look to the user not just if it compiled to show themes. So I think we should check isappthemed() and also isThemeActive() in the library to show the thremed behaviour. We should do the same in our applications too.
Regards

G. N. Rao.
Hyderabad, India
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Perhaps we another function isAppThemeActive() which calls both functions. If it returns false either the Windows theme is not active or the app is not setup to use themes. It true, then Windows themes are active and the application is setup to show themes.

function isAppThemeActive()
return isThemeActive() .and. isAppThemed()

James
Post Reply