如:
有一个radioGroup,Items分别是form的BorderStyle的几个枚举项
选中其中一选项后,form的BorderStyle发生相应变化,怎么实现呢?查了查资料发现有typeinfo和GetEnmuValue等几个函数,不太会用,请教我一下,谢谢!
有一个radioGroup,Items分别是form的BorderStyle的几个枚举项
选中其中一选项后,form的BorderStyle发生相应变化,怎么实现呢?查了查资料发现有typeinfo和GetEnmuValue等几个函数,不太会用,请教我一下,谢谢!
解决方案 »
- Delphi中TForm事件响应
- 三四个用户端的数据库应用程序系统,要不要使用三层架构?
- 为何调用DLL不成功呢?
- 用Rave Reports 5.0 如何给打印内容添加网格线
- 关于获得机器唯一标识的问题,
- treeview中点击树的 + 触发什么事件?[在线]
- 请问Delphi可以打印出象VFP 这种格式的报表吗?
- 多文档中子文档显示问题:如何使字窗体一打开就出现在主窗体中间紧挨工具栏,几积极机
- 两个问题!急,在线等待。
- ole和数据库的问题????
- 如何在dll中创建窗口?
- 我一直搞不清设备的上下文句柄是怎么回事,HDC是设备的设备的上下文句柄,是WIN32的一个概念,请用通俗的话解释一下。
uses typInfo;BorderStyle := TBorderStyle(GetEnumValue(TypeInfo(TBorderStyle),
RadioGroup1.Items[RadioGroup1.ItemIndex]));
Use GetEnumValue to convert the string that represents an enumerated value into the corresponding integer that is its implemented value.TypeInfo is the type information record that describes the enumerated type. You can obtain the type information for a type by calling the TypeInfo function in Delphi or using the __delphirtti operator in C++.Name is the string that is used in code to represent the enumerated value.GetEnumValue returns the corresponding integer value.