• 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: Width of NSSegmentedControl
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Width of NSSegmentedControl


  • Subject: RE: Width of NSSegmentedControl
  • From: "Peter Karlsson" <email@hidden>
  • Date: Fri, 17 Sep 2004 10:02:05 +0000

I see now in the docs that I can't get the individual width of the segments if the segments is set to autosize (they are in my app), they will return 0 as the width in that case. I'm out of ideas. I need to know the width to make my scrollview work. Or is there other ways?

Please, help...

Peter

From: "Peter Karlsson" <email@hidden>
To: email@hidden
Subject: Width of NSSegmentedControl
Date: Fri, 17 Sep 2004 07:52:51 +0000

Dear list!

I have a NSSegmentedControl that the user add segments to with a button. I need to know the width of the segmented control but... I can't use this code:

targetRect = [mySegmentedControl frame];
float width = targetRect.size.width;

This will only give me the width of the control, not the width of all segments together. It seems that the width of the control has nothing to do with the width of all segments added together. Must I use a loop and add individual segment width's together to get the final width?

Best regards Peter

_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Zerolink as a default option
  • Next by Date: Re: Bindings: how to deal with canRemove ?
  • Previous by thread: Width of NSSegmentedControl
  • Next by thread: RE: Width of NSSegmentedControl[SOLVED]
  • Index(es):
    • Date
    • Thread