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_RADIO_INDEX radio button - bug!
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

TreeNode

64 Posts

Posted - 05/13/2011 :  08:23:52 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release Origin 8 SR6
Operating System: Win XP

Hi,

when programmatically changing value of a radio button, in a GetNBox dialog (GETN_RADIO_INDEX)
more than one of the elements are lightened.

please have a look at following code:
// event function - called when changing value in dialog
static bool gender_choose_event(TreeNode& myTree, int nRow, int nType, Dialog& dlgGetNBox)    
{
	TreeNode tn;
	
    if(nRow < 0) // On dialog init, nothing to do
        return false;
 
	if(true)  // <-- missing the type: TRGP_RADIO_INDEX why doesnt exist??
	{
		tn = myTree.GetNode("gender");
		if(!tn)
			return false;
		
		// changing value of the radio button
		tn.nVal = 0;
		tn.nVal = 1;
		tn.nVal = 2;
		
		return true;
	}
	return false;
}
void GetNBox_ex2()
{
    GETN_TREE(myTree)
    GETN_RADIO_INDEX(gender, 0, "male|femal|other")
 
    if( GetNBox(myTree, "gender", "what have you got", NULL, gender_choose_event) )
    {
    	// do something
    }
}

btw: why the type TRGP_RADIO_INDEX does not exist? - to check if radio button changed in event function...


|-- TreeNode
...|-- a??
...|-- ha!!

Penn

China
644 Posts

Posted - 05/16/2011 :  04:19:54 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi TreeNode,

Yes, you are right, it is a bug. And we will try to fix it. Thanks for reporting this bug.

Penn
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