groupbox

Custom GroupBox with round edges

牧云@^-^@ 提交于 2019-12-24 03:09:08
问题 I have a question about UI in visual studio, in C#. I want to make my groupbox custom to look like this: and then, I also want it to expend depends on the user's screen resolution, so the size of the group box isn't fixed, and I need it to be for example 80% of the screen. So my question is actually two question: make a groupbox costum make it 80% (for example) wide of the screen. EDIT : thanks to this answer: How to make group box text alignment center in win forms? I managed to do what I

GroupBox.AutoSize and GroupBox.Text wrapping

我怕爱的太早我们不能终老 提交于 2019-12-23 03:21:53
问题 I have two problems with the GroupBox , they appears after setting GroupBox.AutoSizeMode = AutoSizeMode.GrowAndShrink and GroupBox.AutoSize = true . GroupBox.Text width is not taken into account at all. Sizing will occurs to fit content only and then text will get wrapped if it doesn't fit. If it cannot fit - it is simply not displayed. There is unnecessarily big gap between bottom of the GroupBox and Label inside. Questions: How to make GroupBox respecting its Text property when autosizing?

Group box with title as Check box

ぐ巨炮叔叔 提交于 2019-12-22 05:24:16
问题 I am using Visual Studio 6.0 (VC++ with MFC) in Windows XP platform. I am trying to create a group box with the title of the group box as a check box. My intention is this: If the check box is enabled, the controls inside the group box should be enabled; or else disabled. Is this possible to accomplish? If yes, please give me some directions. Thanks. 回答1: There are a few things you can try, depending on how true you want to stay to your idea and how much work you are prepared to put into the

Determining checked Radiobutton from groupbox in WPF following MVVM

社会主义新天地 提交于 2019-12-20 11:55:18
问题 I have a groupbox with some radiobuttons. How do I get to know which one which is checked? I am using WPF and following MVVM. <GroupBox Name="grpbx_pagerange" Header="Print Range"> <Grid > <RadioButton Name="radbtn_all" Content="All Pages" GroupName="radios_page_range" IsChecked="True" /> <RadioButton x:Name="radbtn_curr" Content="Current Page" GroupName="radios_page_range" /> <RadioButton Name="radbtn_pages" Content="Page Range" GroupName="radios_page_range" /> .... </GroupBox> Now, one way

Transparent background color in TGroupBox - DELPHI

别说谁变了你拦得住时间么 提交于 2019-12-13 14:31:49
问题 How can i set transparent background color in TGroupBox? In my Delphi's form I have a GroupBox and a Panel (graphically overlaid). I wrote a procedure to draw a gradient fill on the Panel using Rect. It works! Now I have another problem: GroupBox backgound color descends from the Form but I wish it was the same of Panel. I can't put GroupBox into Panel because draw procedure fill the entire Panel area (also GroupBox). Is there a way (by code) to set trasparent background color of GroupBox?

Programmatically access controls on GroupBoxes that are on multiple Tab Pages

*爱你&永不变心* 提交于 2019-12-13 07:51:05
问题 How can you programmatically access controls on Tab Pages? My code has many properties that I want to allow the user to initially set when the program starts. These properties will be used to define an Excel chart like title name, font colors, font size, chart position and size, X & Y series and many others properties. The program produces many charts each of which have their own set of properties. Each chart has the same set of properties but different values. My solution using Form1

GroupBox: Adjust size according to text length

泪湿孤枕 提交于 2019-12-13 07:02:12
问题 Is there an easy way to have a GroupBox auto resize its width depending on the length of the string in the Text property? Say I fit the width by hand (in Design Mode ) when the Text = "Text1" then, when the program is running, I update it to Text = "This is the new text!" I would like the width to auto expand instead of wrapping over to the next line. Thanks! 回答1: You need to get the width of the string using the Graphics.MeasureString Method Here the simple example, hint, the width is

VB - Unchecking Check Boxes in a Group Box

99封情书 提交于 2019-12-13 00:28:48
问题 Currently I have 5 group boxes all filled with checkboxes, when I want to unselect all of them (for a 'clear selection' button), I use this code that I found on a forum: For Each CheckBox In grpbox_Hiragana CheckBox.checked = "false" Firstly, I'm sure if this is the correct way to unselect the checkboxes, secondly the "grpbox_Hiragana" groupbox returns the following error: Expression is of type 'System.Windows.Forms.GroupBox', which is not a collection type If anyone could confirm this is the

ScrollViewer is not working inside groupbox?

喜夏-厌秋 提交于 2019-12-12 22:10:12
问题 Hi guys i am new to c# wpf.I have a problem that i want to include ScrollViewer in my Groupbox but it is not working my code is : <GroupBox Margin="10,10,0,0" Grid.Row="0" Grid.ColumnSpan="3" Height="150" > <ScrollViewer> <Grid> <Grid.RowDefinitions> <RowDefinition Height="*" /> <RowDefinition Height="*"/> <RowDefinition Height="*"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="140"/> <ColumnDefinition Width="120"/> <ColumnDefinition

Make all controls inside a GroupBox read-only?

三世轮回 提交于 2019-12-12 18:08:59
问题 I know that many individual controls have a ReadOnly property. But suppose I have a GroupBox in which there are many different controls (text boxes, combo boxes, radio buttons, etc ..), is it possible to set the ReadOnly property for all these controls together? Not that I only want to set this property for the controls within a specific GroupBox (because I have multiple GroupBoxes too, so I don't want the setting to be done for controls in other GroupBoxes) .. Manually setting the ReadOnly