Announcement

Collapse
No announcement yet.

Bigger "jelly-bean" buttons?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bigger "jelly-bean" buttons?

    Anyone know how to change the height of the "jelly-bean" buttons in IB? The height attribute in the size tab is disabled for me.

    I know I can use the other style buttons, but they look severly un-Maclike and the standard Aqua button is too small at 800x600 on my Lilli.

    How about the Tab Buttons on a NSTabView too?

    Thanks,
    -dave
    My pathetic worklog.
    CarFrontEnd (now it's own sub-forum!!!!)

  • #2
    If you are programming in Applescript, sometimes you can fish the properties out of Cocoa and set them using Applescript. Try doing something like this:

    1. Make an Applescript application in Xcode. You probably are working on one right now.
    2. Get the name of the button you want to resize.

    Tell application "yourapplicationnamehere"
    set myButton to button "yourbuttonnamehere" of window "yourwindownamehere"
    properties of myButton
    end tell

    (or maybe "get properties of myButton")

    Start your app, then run this script in Script editor. It ought to dump the properties of your button to the results window. Sometimes, once you know the name of the property you want to alter you can access it through applescript.

    So if the property was called "height", you might try

    "set height of button x to 35"

    Hope that helps.
    Originally posted by ghettocruzer
    I was gung ho on building a PC [until] just recently. However, between my new phone having internet and GPS and all...and this kit...Im starting to have trouble justfiying it haha.
    Want to:
    -Find out about the new iBug iPad install?
    -Find out about carPC's in just 5 minutes? View the Car PC 101 video

    Comment


    • #3
      Originally posted by Bugbyte
      If you are programming in Applescript, sometimes you can fish the properties out of Cocoa and set them using Applescript. Try doing something like this:
      Objective-C just to be difficult

      Actually I thought about that (in Obj-C terms) and poked around the NSButton, NSControl, and NSView objects in the docs and didn't see anything that jumped out at me as the answer.

      I'm sure I am being a bad developer for even entertaining the notion that Apple didn't design something perfectly in the first place

      -dave
      My pathetic worklog.
      CarFrontEnd (now it's own sub-forum!!!!)

      Comment


      • #4
        Originally posted by iamgnat
        Objective-C just to be difficult

        Actually I thought about that (in Obj-C terms) and poked around the NSButton, NSControl, and NSView objects in the docs and didn't see anything that jumped out at me as the answer.

        I'm sure I am being a bad developer for even entertaining the notion that Apple didn't design something perfectly in the first place

        -dave
        Actually, you can't resize the push buttons because resizing them (at least for height) doesn't change their appearance. To see what I mean, call
        Code:
        [myButton setFrameSize:NSMakeSize(80.0, 80.0)];
        [myButton setNeedsDisplay:YES];
        on a push button and a square button. The push button just moves upwards to center in the 80 pixel tall frame, whereas the square button resizes to fill it. You'll probably have to roll your own button, as the end caps for the push button are bitmaps (I think), and won't scale up without looking pixelated.

        Comment

        Working...
        X