The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Column menu
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

illysam

Canada
13 Posts

Posted - 07/25/2003 :  10:44:31 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
How do I get a menu item that is only active when a column is selected in a worksheet?

The behaviour I'm looking for is implemented nicely in Origin's 'Column' menu (items are grayed out when no column is selected).

Thanks.

Mike Buess

USA
3037 Posts

Posted - 07/26/2003 :  10:25:19 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
User-defined menu items cannot be grayed out. The best you can do is test for column selection at the beginning of the item's script, e.g.,

if(wks.sel!=26) {
type -b You must select exactly one column;
return;
}

(See the wks object in LabTalk help.)

You might consider using a button instead. You can put your tests in the Variable box to disable the button when there are no column selections.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 07/26/2003 10:28:31 AM
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000