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
 LabTalk Forum
 Toolbar button status
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

kaiousama

Japan
Posts

Posted - 09/16/2004 :  02:23:30 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi,

i've created a custom toolbar that runs my script's sections. I set some buttons enabled only when the active windows is a worksheet, others only when the enabled window type is a plot.

I have a problem: I need a button of these to be enabled even when no windows are present/active, exactly like Origin's "New worksheet" button does.

Is it possible? How do i have to modify my custom .ini file?

I've attached the .ini file, what i pratically need is that CustomButton1 remains always Enabled.


;User defined toolbar information.
[Common]
BitmapFile=.\sinewave.bmp
ButtonCount=10

[CustomButton1]
FileName=sinewave.ogs
SectionName=open
ArgumentList=
ContextWindow=1
TemplateName=
Worksheet=1
Graph=1
Matrix=1
Excel=1
Layout=1
ToolTip=Import pClamp data
StatusBarMsg=
Index=0
Id=48661

[CustomButton2]
FileName=sinewave.ogs
SectionName=plotavg
ArgumentList=
ContextWindow=1
TemplateName=
Worksheet=1
Graph=0
Matrix=0
Excel=0
Layout=0
ToolTip=Plot average signal
StatusBarMsg=
Index=1
Id=48662

[CustomButton3]
FileName=sinewave.ogs
SectionName=fftsmart
ArgumentList=
ContextWindow=1
TemplateName=
Worksheet=0
Graph=1
Matrix=0
Excel=0
Layout=0
ToolTip=Perform FFT
StatusBarMsg=
Index=2
Id=48663


Origin version : 6.0 professional SR4
Operating System: Windows XP

Mike Buess

USA
3037 Posts

Posted - 09/16/2004 :  07:42:44 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
I have a problem: I need a button of these to be enabled even when no windows are present/active, exactly like Origin's "New worksheet" button does.
That is possible only in Origin 7.0+.

...My (partial) workaround in pre-7.0 days was to keep a minimized worksheet in the project at all times. You can create one at startup or when clicking the New Document button by adding the following macro definition to Macros.cnf...

def autoexec {win -t D; win -i};

You might also need to select Start New Project: None on the Open/Close tab of Tools->Options. This is only a partial solution because it doesn't help in an empty project folder.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 09/16/2004 12:51:16 PM
Go to Top of Page

kaiousama

Japan
Posts

Posted - 09/16/2004 :  1:24:21 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks Mike, keeping a worksheet minimized is a good workaround for the problem, since it needs to be done only when origin is started.
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