RadioGroup和GroupBox有什么区别?

我在RadioGroup中放RadioButton
和GroupBox中一样,搞不明白。


radiogroup有个item属性都是radio控件,不需要拖控件上去。
groupbox需要自己拖控件


分组的和不分组的,radiogroup方便。


RadioGroup的单选按钮是竖着排列的,怎么让它横排呢?


columns选择为2,3,或4,你试一下就知道了


设置RadioGroup的Columns属性可以实现


delphi 中的RadioGroup

RadioGroup 有四个RadioButton 我想获取 选中的RadioButton 的 名字

问得比较菜 还请大家赐教
我在RadioGroup 的 Items中添加的 4个RadioButton 分别为 1、2、3、4 即 当我选中 其中一个 RadioButton时 返回的是 RadioButton的内容 即1、2、3、4 请问有没有直接的属性 或者方法 可以直接实现

procedure TForm1.RadioGroup1Click(Sender: TObject);
begin
edit1.Text:=inttostr(RadioGroup1.ItemIndex);//这是索引
edit2.Text:=RadioGroup1.Items[RadioGroup1.ItemIndex];//这是内容
end;
是不难的,可以这样。你是不是在RadioGroup上加了4个RadioButton?如果是如下
在其中的一个RadioButton的onclick事件写如下代码
showmessage((Sender as TRadioButton).Name);
然后,其它的RadioButton事件也连到这个按钮上。就是在事件中,找到onclick,在列表中选择你刚刚写代码的RadioButton中。
就可以了。你选哪一个,显示的就是这个RadioButton按钮的名字。

elphi7 radiogroup组中 怎么知道有没有被选中呢? 如何取消radiogroup组中被选中的radiobutton


选择某一项RadioGroup1.ItemIndex := 1; (选择第2项,注意下标从0开始)
取消选择项RadioGroup1.ItemIndex := -1;(置为-1即可
获取选择项RadioGroup1.Items[RadioGroup1.ItemIndex ];


判断有没有被选择中if(RadioGroup1.Itemindex >= 0) then sowmessage('选择")

原文地址:https://www.cnblogs.com/jijm123/p/10112981.html