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 macro with build-in translator: Bug or featur

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
additive Posted - 09/06/2010 : 08:55:00 AM
Origin Ver. 8.1 SR2 German
Operating System: Windows XP

Using GETN_COMBO macro reveals a nice feature, but at the same time is rather
dangerous. A list string, e.g.

strComboList = "Cancel|Error|All";
GETN_COMBO(Demo, "Values:", 0, strComboList)

will be translated to

Abbrechen / Fehler / Alle

during run time (shown in the actual dialog box).

How can I switch this off?
I suppose this behoviour occurs in the German version only.
Is it fixed in newer SRs?

/ Michael
6   L A T E S T    R E P L I E S    (Newest First)
qaoffice Posted - 09/17/2010 : 06:24:58 AM
Hi Michael,
please use STR_COMBO_DROPPED_VISIBLE_ITEMS attribute to control how many entries is visible.

#include <GetNbox.h>
void GETN_STRLIST_ex1()
{
GETN_BOX( treeTest );
GETN_STRLIST(WksName, "Worksheet Name (please use short name)", "one", "|one|two|three|four|five|one|two|three|four|five|one|two|three|four|five|one|two|three|four|five|one|two|three|four|five|one|two|three|four|five|one|two|three|four|five|one|two|three|four|five|one|two|three|four|five|one|two|three|four|five|one|two|three|four|five|one|two|three|four|five|one|two|three|four|five|one|two|three|four|five|one|two|three|four|five|one|two|three|four|five|one|two|three|four|five|one|two|three|four|five|one|two|three|four|five|one|two|three|four|five")
treeTest.WksName.SetAttribute(STR_COMBO_DROPPED_VISIBLE_ITEMS, 25);
GetNBox( treeTest )
}

Regards,
Kyle
Penn Posted - 09/16/2010 : 11:24:34 PM
Hi Michael,

We will try to fix this problem in the future version. Thank you for reporting this and sorry for the inconvenience.

By the way, GETN_OPTION_MANUAL_RESIZE is used for dialog size, but not for something like GETN_STRLIST.

Penn
additive Posted - 09/16/2010 : 10:21:04 AM
Hi,
I've found another GETN combo problem.
I'm using GETN_STRLIST now, but if it contains a lot of entries, the combo box will extent over the whole screen. Does anyone how I can avoid this?
GETN_OPTION_MANUAL_RESIZE does not seem to help.




Regards,
Michael
additive Posted - 09/07/2010 : 10:10:47 AM
Thank you! Works great.
Penn Posted - 09/07/2010 : 03:58:02 AM
Hi Michael,

Yes, this translation behavior will occur in the German version. Actually, when using GETN_COMBO macro, the combo list items are usually the numbers. For the string combo list items, the GETN_LIST macro will be used more often.

When using the GETN_LIST macro, the TreeNode::SetAttribute method can be used to prevent such behavior from happening, by passing parameters STR_OCNTRL_OPTNS and OCNTRLPARAM1_NOT_LOCALIZED. For example:

void testCombo()
{
	GETN_BOX(trDemo);
	string strComboList = "Cancel|Error|All";
	
	//GETN_COMBO(Demo, "Values:", 0, strComboList);
	GETN_LIST(Demo, "Values:", 0, strComboList);  // use GETN_LIST
	trDemo.Demo.SetAttribute(STR_OCNTRL_OPTNS, OCNTRLPARAM1_NOT_LOCALIZED);  // prevent translation
	
	if(GetNBox(trDemo))
		out_tree(trDemo);
}


Penn
additive Posted - 09/06/2010 : 11:21:01 AM
Please note that not all entries will be translated ...

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