Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Sat Dec 15, 2018 1:46 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Labels and Cocoa
PostPosted: Thu Nov 29, 2012 7:31 pm 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
I have a label ... font is CHALKBOARD, fontsize is 22, control size is 500 x 24

in CARBON it display exactly as it should.

In COCOA the text is pushed down (as if there is a margin or padding between the top of the control and the top of where the text is rendered.... meaning that I need to make the control 500 x 32 before all of the text appears (single line of text).

This creates issues now, because each label needs to be 50% taller to accomodate the exact same text as before.. making control placement problematic (I don't want controls overlapping, which they don't do at 24... but would do if I have to increase to 32)

So my question is..
a) is this the way Cocoa is going to be, so learn to live with it?
b) is it a "bug" that will be address in a future release?
c) is there something addtional I need to assign to Cocoa Labels to make them work like Carbon?

btw... It looks FINE in the IDE.... but at runtime it looks bad.

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
Reply with quote  
 Post subject: Re: Labels and Cocoa
PostPosted: Fri Nov 30, 2012 12:44 am 
Offline

Joined: Mon Aug 15, 2011 10:25 pm
Posts: 293
Current IDE is still Carbon hence the reason it looks fine there as well as Carbon apps..

_________________
Real Studio 2012r1.1 | MacBook Pro i5, 10.6.8 | Windows 7


Top
 Profile  
Reply with quote  
 Post subject: Re: Labels and Cocoa
PostPosted: Fri Nov 30, 2012 9:29 am 
Offline

Joined: Fri Nov 16, 2012 8:10 pm
Posts: 34
I have the same problem with push buttons, on carbon the text is centered, on cocoa not.

And on cocoa the Quicktime Player is not shown.
cocoa:
Image
carbon:
Image

_________________
OSX 10.8.3
ListBox Example Project OSX
TextEditor Example Project OSX
Homepage


Top
 Profile  
Reply with quote  
 Post subject: Re: Labels and Cocoa
PostPosted: Fri Nov 30, 2012 6:33 pm 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
This does NOT seem to be an issue with "System" font.... but it is a HUGE issue if you change to something else... in my case I want/need to use CHALKBOARD.... and COCOA apps don't handle it properly... it places a huge padding or margin at the top.

Has nobody else run across this? developed a workaround? anything?

Here is an example
Image

The black text is from COCOA compile, the red from CARBON
The top text has a label height of 24px, the bottom is 32px

The ONLY difference between the two is changing the COLOR for this example. The picture is a composite cut from two screen shots
As you can see CARBON is properly centered vertically... while COCOA has a top padding, requiring the height be increased 50% in order
to display the whole text. "System" font does seem to work... but at least this one does not... and I need this one


Verdana and Courier also screw up.... ARIAL works correctly

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
Reply with quote  
 Post subject: Re: Labels and Cocoa
PostPosted: Fri Nov 30, 2012 7:30 pm 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
Did some more research.... this problem is NOT with RealStudio... it is with Cocoas own inability to handle certain fonts..... Has something do with with how certain internal attributes are defined. If defined one way it will work.. if define another way it won't.... but Carbon can handle both ways.

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group