Scroll bar not appearing during runtime [closed] - c#

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
I had search on scroll bar not appearing topic.
i believed my problem is the same as others but the solution but it seems none of them help.
I had a few button which i create in design stage within a panel, when some button are out of the area of the panel, the IDE does show the scrollbar which i set Autoscroll to True.
However during runtime, i cannot see any scroll bar nor can i scroll into those control that is out of the area of the panel
I tried Anchor the buttons all around and it does not help. Setting AutoScrollMinSize to a large value also does not help.
Am i missing other ways?
**Edit
Attached is a picture i snapshot during design and runtime

try Setting Panel AutoScrollMinSize
panel1.AutoScrollMinSize = new Size(0, 10); // 10 or Minimum Height you require
If the above also didnt work check the tab order and make the panel to be on the top most parent.
I feel you are making some changes in runtime. Your Design-time Screenshot and runtime screen seems to have background difference, try setting AutoScrollMinSize again after setting background

Related

c# Buttons as toggles [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
Hello i am new in C# and need some help
In both groupboxes have buttons they are now like toggle butons, but now can i choose only one button from all.
looking for:
clik one from Groupbox1, one from Groupbox2
clicked buttons will have green background
after press OK show messagebox with button name GB2 + " - " GB1
....................................................
Another question:
Buttons 1-6 can be added as dynamic buttons directly from SQL?
From Sql need have ID and Name
....................................................
Just some hints:
Use a RadioButton with Appearance set to Button.
Check the Remarks of the radio button to find out how to make two groups.
Subscribe to CheckedChanged event and set BackColor according to value in Checked property.
To dynamically insert buttons, take a look into designer.cs file. You can create your own buttons exactly the same way at runtime by doing the same stuff in your own method which you call whenever needed with desired parameters.
For the message box message check the state of all radio buttons and take the name from the box where Checked is true. (Advanced users would filter the Controls property for the desired type and value by using LINQ).
If you have started all of these and have a more concrete question: Ask a new question for one problem. Don't hope to ask one question containing all your questions and get a working example back.

Resize issue in Windows form application in 2560x1600 resolution display [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
I have a form application working fine on various displays with varying screen resolution but in a machine with 2560x1600 resolution it shrinks to a very small size.
It works fine all smaller resolution and i am not able to find a reason behind it. I have used anchor, docking, autoscalemode and various other properties still it fails only in this above mentioned screen resolution
You can resize the window on startup, for example:
private void Form1_Load(object sender, EventArgs e) {
Size = new Size(Screen.PrimaryScreen.WorkingArea.Right / 2, Screen.PrimaryScreen.WorkingArea.Bottom / 2);
}
That's the example only. You have to modify the above code to ensure you are finding the right screen and the right coordinantes.

Circular Progress Button WPF/C# Custom Control [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I want to make a button in my WPF windows application that is primarily a circular button. I have found plenty of tutorials online using numerous different methods such as templates and styling so that part I can figure out.
The catch is that I want the custom control (which is what I think I want because from my understanding just styles alone wont let me modify core functions of the button and user controls are more groups of already done controls) because I want something that is part button and part progress bar. I want it to be a circular button with a gray strip around the perimeter of the button a few pixels thick that when I press and hold the button I can start a circular blue strip around that gray perimeter and when the blue reaches the top after one revolution some event may be triggered in the code.
I have been trying to find stuff online but it seems like there is a lot of disjointed and confusing tutorials on how to make custom WPF controls. Some are for expression blend which doesn't totally match the blend that installs with visual studio community 2015 so I am just thoroughly confused and was hoping someone could point me in the right direction. Thanks in advance!
You can easy customize regular button or toggle button:
Open project in VS
Right click on xaml in solution explorer you want to edit
Click on "Design in Blend"
Select Assets tab
Find "Button" in controls and drag it to page
Right click on the button on page
Edit template -> Edit a copy -> OK
Objects and timeline tab -> right click on border -> Change layout type -> Canvas
Remove backgroun from the canvas in properties tab
Drag elipsis from Assets->Shapes
Adjust elipsis size
Goto States tab -> Selected "Pressed"
Change color of the ellipsis in pressed state
... to be continue.
You don't necessarily need a custom control. You can have a UserControl with a circular button, and overlay a circular Path over the edge of the button. Set that Path object's visibility to false initially, and when you detect a left click down event on your button, make that circular path visible and start a rotate transform animation on it. You should be able to expand on this to stop the animation when you want to; your description doesn't fully describe what ways you want it to stop.
Hope this helps!

How do i collapse panels so that the panels below it take their space? [duplicate]

This question already has answers here:
winforms accordion [closed]
(3 answers)
Closed 7 years ago.
im not the strongest visual studio v# developer so please bear with me.
I am trying to have multiple panels on a page, one below the other, with what will amount to a line of text in each one.
Sometimes, I do not want to show some of these panels. When I don't want to show a panel, I want the panels below it to 'move up' and take its spot... essentially, when panels aren't visible, I don't want a ton of blank space filling their location.
How the heck can I do this? ive tried a bunch of things but im at a loss..
thanks in advance :)
You can use this https://visualstudiogallery.msdn.microsoft.com/40B89FC7-80FA-4E95-B707-506084F51D6B
Or that se System.Windows.Forms.SplitContainer
inside the SplitContainer panel you can use a FlowLayoutPanel or a custom toolbox

How to hide items in Visual Express 2012 for Windows Phone [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
I'm a very early coder and using c# for desktop to start off and I heard I could code for windows phone using c# but it is so different it makes my head spin.
How do I hide a rectangle called "rctSquare1"? I'm used to typing "rctSquare1.Hide();" but that doesn't work and I cant find any answers...
try
rctSquare1.Visibility = Visibility.Hidden;
Update
What about that?
rctSquare1.Opacity = 0;
Set one of the following Visibility values on your element:
Setting it to Visibility.Hidden will leave empty space in your window where the element was (similar to SomeControl.Hide() in WinForms.
Do not display the element, and do not reserve space for it in layout.
rect.Visibility = Visibility.Collapsed;
Alternatively, Visibility.Collapsed will actually hide the element and collapse the empty space too. If your element is inside a grid, for example, then setting to Collapsed will cause the row to collapse as well (as long as you aren't setting an explicit height on the row, and there aren't any other elements in the row preventing it from collapsing).
Do not display the element, but reserve space for the element in layout.
rect.Visibility = Visibility.Hidden;

Categories