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
 How to write code file from the GUI

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
kineticesp Posted - 10/17/2008 : 11:57:03 AM
Hi,

I have a program that uses a GETN_BOX GUI to get parameters for the functions.
These parameters are GETN_NUM dVal type, and according to the syntax they are declared with default values.
I want to change these default values from the GUI itself, like change the value and click a checkbox that set this new value as the new default value.

Is it possible?

Thanks in advance
1   L A T E S T    R E P L I E S    (Newest First)
Iris_Bai Posted - 10/29/2008 : 06:19:17 AM
Hi,

GetN support event function to handle this case, please see:

int testEvent(TreeNode& tr, int nRow, int nEvent, DWORD& dwEnables, LPCSTR lpcszNodeName, WndContainer& getNContainer, string& strAux, string& strErrMsg)
{

	TreeNode trN = tree_get_node(tr, nRow); // get changed tree node
	if( trN && trN.tagName == "test") 
	{
		tr.Value.dVal = trN.nVal;
	}

	return 0;//no error
}

void testGetNApplyButton()
{
	GETN_TREE(tr)
	GETN_CHECK(test, "Yes or No", 0)
	GETN_NUM(Value, "Value", 0)
	
	if( GetNBox(tr, testEvent) )
	{
		// enter here if click OK button
		out_tree(tr);
	}
}


Compile and run "testGetNApplyButton", click check box, Value control will be changed.

Iris

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