如何将枚举值转换为字符串值?

发布于 2024-08-11 03:47:22 字数 267 浏览 1 评论 0原文

我正在获取 PBObjects/Controls 的属性列表。所以我需要拿走财产。我通过变量定义获得了属性值。

对于前

vd_def = cd_def.variablelist[li_i]

vd_def.name
vd_def.initialvalue // if this initial value is enumerated, then how can i get this value 

请帮助我。

提前致谢。

i am taking the property list of PBObjects/Controls. So i need to take the property. I got the property values throug variable definition.

for ex

vd_def = cd_def.variablelist[li_i]

vd_def.name
vd_def.initialvalue // if this initial value is enumerated, then how can i get this value 

please help me.

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一瞬间的火花 2024-08-18 03:47:22

我使用 typedefinition 对象从这里得到了我的问题的答案,

我得到了枚举类型的数据类型(它显示了属性名称)。并将该属性名称的任何值和数据类型传递给一个函数,如下所示

If IsNull(aws_windowstate) Then
    String ls_null
    SetNull(ls_null)
    Return ls_null
End If

Choose Case aws_windowstate
    Case Normal!
        Return "normal!"
    Case Maximized!
        Return "maximized!"
    Case Minimized!
        Return "minimized!"
    case else
        return "!"
End Choose

i got the answer for my question

using typedefinition object from here i'm getting the datatypeof that enumerated type(it shows the property name). and passing the any value and datatypeof that property name to a function which is like

If IsNull(aws_windowstate) Then
    String ls_null
    SetNull(ls_null)
    Return ls_null
End If

Choose Case aws_windowstate
    Case Normal!
        Return "normal!"
    Case Maximized!
        Return "maximized!"
    Case Minimized!
        Return "minimized!"
    case else
        return "!"
End Choose
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文