• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Centering CheckBox in Table Column
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Centering CheckBox in Table Column


  • Subject: Re: Centering CheckBox in Table Column
  • From: development3 <email@hidden>
  • Date: Tue, 27 Feb 2007 11:21:35 -0700

Hi Stephane,
Thanks, but that does not work either. If I add the line

[buttonCell setImagePositon:NSImageOnly];

the checkbox does not even show up. So that's not it.

Thanks  though for your input.



On Feb 27, 2007, at 10:33 AM, Stephane wrote:

If your checkbox does not have any title:

tPrototypeCell = [[NSButtonCell alloc] initTextCell: @""];

if (tPrototypeCell!=nil)
{
[tPrototypeCell setEditable: YES];
[tPrototypeCell setButtonType:NSRadioButton];
[tPrototypeCell setImagePosition:NSImageOnly]; // <- This is what probably interests you the most
[tPrototypeCell setControlSize:NSSmallControlSize];


	tColumn=[IBsetsArray_ tableColumnWithIdentifier:@"State"];
	[tColumn setDataCell:tPrototypeCell];

	[tPrototypeCell release];
}


On Feb 27, 2007, at 6:13 , development3 wrote:

I am hoping that someone can help me.

I have a table, with two columns. The second column has check box. That all works correctly, The problem is that the Check Box is drawn the very left in the column. The problem is I would like them drawn Centered. I have tried setting the Alignment for the data for the column to centered. But I think that only works for text. This would not look so bad except the column is like 70 pixels, and I can not make it smaller because of the Column title. I have searched the archives but found nothing on this. Is this possible? If so how? It really looks stupid. It works fine, just looks stupid.

Thanks in advance for any help.


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Centering CheckBox in Table Column (From: development3 <email@hidden>)
 >Re: Centering CheckBox in Table Column (From: Stephane <email@hidden>)

  • Prev by Date: Re: porting core data app to the dark side
  • Next by Date: Re: Search Index Crash While Indexing Webarchive
  • Previous by thread: Re: Centering CheckBox in Table Column
  • Next by thread: Search Index Crash While Indexing Webarchive
  • Index(es):
    • Date
    • Thread