groupbox

VB / C#: Resizing two controls equally

拥有回忆 提交于 2019-12-04 03:29:39
问题 I have made a window in which I will be having two groups/panels and some buttons in between them. I want to code the resizing behavior in a way that when the window expands, the two panels increase their widths while keeping the distance between them constant. Please see this mockup: As you see above, I want the 'Local' and 'Server' Panels to resize while keeping the distance in between them same. If I use anchors (Top+Left+Right+Bottom), the left panel will overlap the right one and the

GroupBox in WPF can only contain one element?

不想你离开。 提交于 2019-12-03 09:17:06
It seem that GroupBox can only contain one element, if I place more than one it's won't go inside(or get deleted in blend). Is this by design or am I doing something wrong? That sounds right to me. You'd need to put a Grid or Panel (StackPanel, WrapPanel, etc) as a child to define the layout. Yes, in WPF the GroupBox will contain maximum of 1 element. You can include Grid as its child and in grid specify your desired components. For example 1 placed two buttons in GroupBox using Grid. Document Outline is shown below: Code is as follow: <GroupBox Header="Read Sensor" HorizontalAlignment="Left"

Border of qgroupbox

会有一股神秘感。 提交于 2019-12-03 08:35:56
问题 I'm having some trouble setting a border of a groupbox. my aim is to have something like this: but so far all I can get is this: the stylesheet i'm using: #groupBox { border: 1px solid gray; border-radius: 9px; } 回答1: QGroupBox { border: 1px solid gray; border-radius: 9px; margin-top: 0.5em; } QGroupBox::title { subcontrol-origin: margin; left: 10px; padding: 0 3px 0 3px; } 回答2: I suggest QGroupBox::title { subcontrol-origin: margin; left: 3px; padding: 3 0 3 0; } for the title, to adjust the

Determining checked Radiobutton from groupbox in WPF following MVVM

我们两清 提交于 2019-12-03 02:02:30
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 I could figure out was to bind each RadioButton's IsChecked Property to some property in ViewModel and

Border of qgroupbox

被刻印的时光 ゝ 提交于 2019-12-02 22:28:20
I'm having some trouble setting a border of a groupbox. my aim is to have something like this: but so far all I can get is this: the stylesheet i'm using: #groupBox { border: 1px solid gray; border-radius: 9px; } QGroupBox { border: 1px solid gray; border-radius: 9px; margin-top: 0.5em; } QGroupBox::title { subcontrol-origin: margin; left: 10px; padding: 0 3px 0 3px; } I suggest QGroupBox::title { subcontrol-origin: margin; left: 3px; padding: 3 0 3 0; } for the title, to adjust the title more properly. 来源: https://stackoverflow.com/questions/14582591/border-of-qgroupbox

Why is only the first RadioButton being added to the GroupBox?

那年仲夏 提交于 2019-12-02 19:20:37
问题 I am trying to dynamically create Windows controls and add them to a Panel. For Button and Checkbox this has worked fine; I've run into a problem with a GroupBox, though, with RadioButtons inside it. The first RadioButton element is created and added to the GroupBox in the expected location, but susbequent ones, although ostensibly created (stepping through the code makes that appear to be the case), they are not visible. I would think that if subsequent RadioButtons were being plopped atop

How can I change the border thickness of a Groupbox on a windows form in C#?

那年仲夏 提交于 2019-12-01 19:20:16
问题 I didn't find any solution that helped me on the older questions on SO... Is it possible to make them thicker or just more visible by changing the color? If yes, some code would be great... or just a hint how to do it... 回答1: You'll need to make a custom GroupBox control. See The Grouper - A Custom Groupbox Control 回答2: GroupBox is a custom drawn .Net control. You will need to hook into the Paint event, or derive from the GroupBox and override the OnPaint method, determine where the existing

VB / C#: Resizing two controls equally

流过昼夜 提交于 2019-12-01 19:14:30
I have made a window in which I will be having two groups/panels and some buttons in between them. I want to code the resizing behavior in a way that when the window expands, the two panels increase their widths while keeping the distance between them constant. Please see this mockup: As you see above, I want the 'Local' and 'Server' Panels to resize while keeping the distance in between them same. If I use anchors (Top+Left+Right+Bottom), the left panel will overlap the right one and the right's width one will go out of the window. I want them to share the increased width of the window

Why does Windres report a syntax error on my GROUPBOX statement?

我们两清 提交于 2019-12-01 18:51:06
问题 I'm experimenting with the Win32 API in C++, specifically with writing resource files. Now, my entire project was working just fine, menus and titles and everything. However, when I add this code for a modal dialog box to the .rc file: IDD_ABOUT DIALOG DISCARDABLE 0, 0, 239, 66 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "My About Box" FONT 8, "MS Sans Serif" BEGIN DEFPUSHBUTTON "&OK",IDOK,174,18,50,14 PUSHBUTTON "&Cancel",IDCANCEL,174,35,50,14 GROUPBOX "About this

Android: how to make a GroupBox widget?

拜拜、爱过 提交于 2019-12-01 18:39:31
It appears that Android doesn't offer such a useful widget. However, my screen design requires a view like this: Also, the interaction design requires that such boxes are displayed and hidden, depending on other data. Of course, I could construct such box from separate elements in my XML layout (e.g. from a shape and a textview over it), but then managing their visibility turns into hell... So it's clear that what is needed here is a container, like a relative layout. Such container can have children in XML layout and can be shown and hidden with a simple setVisibility(...) call. Can someone