Real Software Forums
http://forums.realsoftware.com/

More Cocoa 'Issues'
http://forums.realsoftware.com/viewtopic.php?f=7&t=47153
Page 1 of 1

Author:  kermit [ Tue Mar 05, 2013 4:36 am ]
Post subject:  More Cocoa 'Issues'

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.

Author:  rowlands [ Mon Mar 11, 2013 8:32 pm ]
Post subject:  Re: More Cocoa 'Issues'

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.

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/