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
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 User Defined Buttons in Origin 5.0

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
chaskard Posted - 12/23/2001 : 11:06:54 PM
Hello,

Can anyone tell me how to add in a button(or menu option) with Origin 5.0? I am only just starting to try and write script. I am confused by the manuals I have and nothing I've tried works.

Thanks heaps!

2   L A T E S T    R E P L I E S    (Newest First)
Lorraine Posted - 12/31/2001 : 09:18:06 AM
Also, here's another resource you can use in Origin. Please visit one of our knowledge base items regarding the Custom Routine button:

http://www.originlab.com/www/support/resultstech.asp?ItemID=655&VersionID=All&TitleID=Executing+Your+LabTalk+Script+from+the+Custom+Routine+Button&CatID=LabTalk+Tip&TypeID=Script

Lorraine
OriginLab Technical Support
Laurie Posted - 12/31/2001 : 09:06:54 AM
You need to look at the LabTalk Resources page. Here you'll find lots of useful sample scripts to get you started.

The information below comes from the on-line help, searching on 'button'.

Buttons can be created from any label. In the following example, you create a button from a text label and define the button to open a dialog box containing the message "Hello World!".

Creating the Text Label

1) Click the New Graph button on the Standard toolbar to open a new graph window.

2) Open the Tools toolbar by selecting View:Toolbars. Select the Toolbars check box and click Close.
3) Select the Text tool from the Tools toolbar.

4) Click in a blank area of the graph window. This action opens the Text Control dialog box. Type Hello in the text box.
5) Click OK to close the dialog box. The Hello text label displays on the screen.

Changing the Label into a Button

1) Select Edit:Button Edit Mode to enter Button Edit Mode. This menu command is checked when in Button Edit Mode.
2) Click once on the Hello text label to select it, then select Format:Label Control. This menu command opens the associated Label Control dialog box.
3) Click in the text box at the bottom of the dialog box and type in the following text (this is the script for the control):

type -b "Hello World";

Selecting the Script Execution Option

1) Select Button Up from the Script, Run After drop-down list.

The Button Up option informs Origin that the script is executed when the button is clicked. Each of the options from the Script, Run After drop-down list establish a different method for script execution. For example, select Moved to execute the associated script when the text label is moved.

2) Click OK to close the dialog box. If you are in Button Edit Mode, select Edit:Button Edit Mode to exit the editing mode. The Hello text label now displays on your screen as a button. When you click the button, an Attention dialog box opens and displays "Hello World!".
3) Click OK to clear the Attention dialog box from the screen.

OriginLab Technical Support

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000