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_RADIO_INDEX radio button - bug!

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
TreeNode Posted - 05/13/2011 : 08:23:52 AM
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!!
1   L A T E S T    R E P L I E S    (Newest First)
Penn Posted - 05/16/2011 : 04:19:54 AM
Hi TreeNode,

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

Penn

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