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
 Forum for Origin C
 GETN_ADD_AUTO

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
couturier Posted - 06/01/2016 : 07:37:21 AM
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
2   L A T E S T    R E P L I E S    (Newest First)
couturier Posted - 06/02/2016 : 1:41:12 PM
Thanks a lot
SeanMao Posted - 06/01/2016 : 11:22:07 PM
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.

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