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
 Hiding and Showing Columns
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Drbobshepherd

USA
Posts

Posted - 11/30/2012 :  5:54:44 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin):OriginPro8.6
Operating System: XP

I need to know how to hide/show columns in LabTalk.

DrBob

Penn

China
644 Posts

Posted - 12/03/2012 :  01:13:09 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi DrBob,

You can try the colhide X-Function. For example:

colhide irng:=[book1]1!col(c) operation:=0;  // hide column C, 0=hide, 1=show


Penn
Go to Top of Page

couturier

France
291 Posts

Posted - 12/03/2012 :  03:15:55 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You can also use the width property, that will work faster than Xfunction:

range rCol=2;
rCol.width=0;
Go to Top of Page

Drbobshepherd

USA
Posts

Posted - 12/04/2012 :  10:32:58 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you for the suggestions.

Couturier, slight bug-- I had to change the range command to "range rCol=col(2);" to get it working. Your suggestion was slightly faster and it got me to think of a simpler approach. Your two commands could be replaced by one line: "wks.col2.width=0;". However, I will keep your suggestion in mind if I want to use column labels instead of column numbers.

Colhide looks to be a good X-function to keep in mind if I want to restore columns to their original width. Note to OriginLab: I couldn't find colhide in the help files.

Thanks again,
DrBob
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