Microchip
直播中

李雪飞

7年用户 174经验值
私信 关注
[问答]

文本字段功能是否被另一种方法取代

似乎有几个文本字段函数不协调,2.03b;追加,明文来命名。这些功能是否被另一种方法取代或不再可用?

以上来自于百度翻译


      以下为原文

    There appear to be several Text Field functions not in HARMony 2.03b; append, clear text to name a few.  
Have these functions been replaced by another method or no longer going to be available?

回帖(4)

魏紫瑜

2019-2-12 15:06:40
您好,您现在可以使用API修改图形文本字符串。一个很快的例子可以在“阿里亚计数器”演示中看到,我们有一个计数器运行显示。当然,这种输入可能来自任何地方,而不仅仅是数字数据。这个演示还演示了如何在处理这些字符串时防止内存问题。

以上来自于百度翻译


      以下为原文

    Hello,
 
You can modify a graphics text string using APIs now.  A quick example of this can be seen in the 'aria_counter' demo, where we have a counter running for display.  Of course this input could come from anywhere, and not just numerical data.  This demo also shows how to prevent memory issues when dealing with those strings.
举报

张静

2019-2-12 15:19:48
我发现了函数LaSTRIGIN追加。这不能用于在显示文本之前追加文本吗?清除文本?如果他们取代你在阿里亚伯爵的演示,你会做什么?特别是对于5个有自己标签的数字?

以上来自于百度翻译


      以下为原文

    I've found the function laString_Append.  Can't this be used to append text before displaying it? And laString_Clear to clear the text?
What would these do if they replace what you have in aria_count demo?  Especially for the 5 numbers that have their own labels?
举报

周灿金

2019-2-12 15:33:14
嗨,RBISMC,是的,你应该能够使用LASTRIGIN清除和LASTRIGPENG来清除和附加文本字段小部件中的字符串。请尝试下面的示例代码,让我知道它是如何工作的。

以上来自于百度翻译


      以下为原文

    Hi rbmisc,
 
    Yes, you should be able to use laString_Clear and laString_Apped to clear and append strings in a text field widget. Please try the sample code below, and let me know how it works.
 
To Clear:
    laString_Clear(&TextFieldWidget1->text);
    laWidget_Invalidate((laWidget*)TextFieldWidget1); 
To Append:
    laString str = laString_CreateFromID(string_ID); //See gfx_assets.h for the string IDs
    laString_Append(&TextFieldWidget1->text, &str);
    laWidget_Invalidate((laWidget*)TextFieldWidget1); 
Thanks,
 
Ed@Microchip
举报

张静

2019-2-12 15:44:29
这就是我所需要的。谢谢。有趣的是,文本字段必须有初始文本,在其中被清除或追加不起作用。现在,这是工作,我似乎有字体问题。我将开始另一个职位。

以上来自于百度翻译


      以下为原文

    This is what I needed.  Thanks.  One thing that is interesting is that the text field has to have initial text in it that was cleared out or append doesn't work.
 
Now that this is working, I seem to have issues with fonts.  I'll start another post.
举报

更多回帖

发帖
×
20
完善资料,
赚取积分