Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Tue Nov 19, 2019 1:10 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: More Cocoa 'Issues'
PostPosted: Tue Mar 05, 2013 4:36 am 
Offline

Joined: Mon May 30, 2011 12:56 am
Posts: 702
Im getting close to using Cocoa build.

Couple of issues:

TabPanel is opaque on Carbon, but transparent on Cocoa.
Bevelbutton, with caption set to 'below icon' displays the text above the icon always in Cocoa.

Any fixes/workarounds?
And any idea how to stop buttons going transparent if the window loses focus? I thought that might be the autodeactivate property, but that makes no difference either.


Top
 Profile  
Reply with quote  
 Post subject: Re: More Cocoa 'Issues'
PostPosted: Mon Mar 11, 2013 8:32 pm 
Offline
User avatar

Joined: Fri Sep 30, 2005 11:00 am
Posts: 583
Location: Beautiful Taiwan
kermit wrote:
Im getting close to using Cocoa build.

Couple of issues:

TabPanel is opaque on Carbon, but transparent on Cocoa.
Bevelbutton, with caption set to 'below icon' displays the text above the icon always in Cocoa.

Any fixes/workarounds?
And any idea how to stop buttons going transparent if the window loses focus? I thought that might be the autodeactivate property, but that makes no difference either.

The Bevel Button, I might be able to help with. Using declares you can make a regular push button look and function like a bevel button. Before you ask me why, because you can then have more control.

The below code is a combination of MBS and declares the create a Bevel Button with a large icon and text underneath.

Dim p as NSImageMBS

if buyNowButton.NSViewMBS <> nil then
Dim nsb as NSButtonMBS = NSButtonMBS( buyNowButton.NSViewMBS )
if nsb <> nil then
if inIcon <> nil then
p = inIcon.NSImage
if retina then p.setSize( p.width * 0.5, p.Height * 0.5 )
end if

nsb.image = nil
if p <> nil then
nsb.image = p
else
nsb.image = nil
end if

//- (void)setImagePosition:(NSCellImagePosition)aPosition

Declare Sub setImagePosition lib "Cocoa" selector "setImagePosition:" ( ID as integer, position as integer )

const NSImageAbove = 5

setImagePosition( nsb.handle, NSImageAbove )
end if
end if


It should be enough to get you started.

_________________
Sam Rowlands
rMBP 15" @ 10.8 & '08 MBA 13" @ 10.6 + 10.7, RB2012
http://www.ohanaware.com/
AppWrapper - Prepare Apps for Mac App Store & OS X 10.8 - http://www.ohanaware.com/appwrapper/


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group