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

couturier

France
291 Posts

Posted - 06/01/2016 :  07:37:21 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 2016 SR2
Operating System: 7

In a GETN dialog, such as
GETN_NUM(start, "Start Time", 1) GETN_ADD_AUTO(1)

is it possible to show/hide the checkbox, depending on another condition ?

Thanks

SeanMao

China
288 Posts

Posted - 06/01/2016 :  11:22:07 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Below is an example show you how to do it:

#include <Origin.h>
#include <GetNbox.h>

////////////////////////////////////////////////////////////////////////////////////
int test_event1(TreeNode& tr, int nRow, int nEvent, DWORD& dwEnables, LPCSTR lpcszNodeName, WndContainer& getNContainer, string& strAux, string& strErrMsg)
{
	TreeNode trNum = tr.MyNum;
	int nUseAuto = tr.UseAuto.nVal;
	if ( nUseAuto )
	{
		octree_set_auto_support(&trNum, AUTO_CHECKED);
	}
	else
	{
		octree_set_auto_support(&trNum, AUTO_NOT_SUPPORT);
	}
	tr.MyHide.SetAttribute(STR_LABEL_ATTRIB, nUseAuto ? "Enable Auto 1" : "Enable Auto 2");
	return true;
}


int	test_getn_ex_ex_ex()
{
	GETN_TREE(tr);
	GETN_NUM(MyNum, "Money", 2)	GETN_ADD_AUTO(1)
	GETN_CHECK(UseAuto, "Enable Auto", 1);
	GETN_NUM(MyHide, "Hide", 2) GETN_CURRENT_SUBNODE.Show = 0;
	if ( GetNBox(tr, test_event1, "Data Generator", "Test", GetWindow()) )
	{
		return 0;
	}
	return 1;
}




Regards!

Sean

OriginLab Tech.
Go to Top of Page

couturier

France
291 Posts

Posted - 06/02/2016 :  1:41:12 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks a lot
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