Page 1 of 1
TBAR ChangeBitMap method not found
Posted: Thu Dec 20, 2007 11:29 am
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.
Posted: Sat Dec 22, 2007 8:14 am
by Antonio Linares
NageswaraRao,
Fixed. In source\classes\rpreview.prg change twice:
if ! IsAppThemed()
into
if ! IsAppThemed() .or. Upper( ::oBar:ClassName() ) == "TBAR"
Thanks!
Posted: Sat Dec 22, 2007 1:15 pm
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?
Posted: Sat Dec 22, 2007 2:51 pm
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
Posted: Sun Dec 23, 2007 12:58 pm
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.
Posted: Sun Dec 23, 2007 8:10 pm
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