Little round help button...

Any idea how I get the little round help button on a window i.e. context sensitive help like the one on the bottom right of every window in System Preferences on MacOs. Wasn’t sure if there was a standard way of displaying it.

My solution would be a large round bevel button with a question mark icon on it but wondered if this was the way. Want it to look native.

I like Mike’s code - http://mike.waterfallsw.com/realbasic/HelpButton.zip - just rename the .rb file in the ZIP to .rbp and it will open automatically. Note, however, that Apple’s apps are moving away from that design.

Tim

I didn’t realise. So what do they suggest now for help on specific items on a window?

Tim, I have just had a look on the Apple Human Interface Guidelines and the help button is still listed and there is no mention of them moving away from it. Have you read something to this effect?

They’re still using a button, it’s just not Purple. Also, Christian’s MBS plugins allow you to create a NSButton with a type of NSHelpButtonBezelStyle (9).

The MBS method will probably match the style for the current OS X version.

Thanks Tim I will have a look. I thought all the controls in Xojo were going to be native once we went over to Xojo from RB. If this is the case why haven’t we got things like this? Surely it would just be one of the ButtonStyle constants.

The buttons are native, that’s how .Handle works in this NSButton declare

soft declare sub setBezelStyle lib "Cocoa.framework" selector "setBezelStyle:" (id As integer, style As integer) setBezelStyle(PushButton2.Handle, 9)

Native controls <> All possible controls are available. Xojo strives for the subset that are available on all platforms.

I missed this one. You simple add a normal button and set it’s ButtonStyle property to ‘help’. No declares required.

1 Like