ToolStrip TextBox Colour - c#

I have set up a ToolStrip in my C# WinForms project and have added a TextBox on it. I'm just curious whether it is normal that the TextBox is barely visible due to the colour of the ToolStrip and TextBox.
I could put a border around it or change the background colour of the TextBox but that just looks odd.
Is there some property which I haven't thought of which I could set to make it stand out more but not look out of place?
Screenshot added:

A very light border would probably be best. if you use the same color as the toolstrip, you won't really notice the border at the bottom, but it will make the top of the search box stand out. you might also want to add a margin around it, or less padding inside of it, so it doesn't fill up the whole hight.

Related

Remove border from ToolStripMenuItem

I am customizing my MenuStrip to make it look better. I've gone really far from default one but there is 1 thing left which I could not change. My MenuStrip looks like this right now.
As you can see in the image there is a grey border around my ToolStripMenuItem. I want to remove it but I can't. I have try this solution and it changed the color a bit. how can I change toolstripmenuitem border color?
I tried Color.Pink to see the difference and yes it did change the color but it was like around the pink border the grey one was still there. I want to make it totally dissappear. Borderless I mean. I will also show how my menu looks like when I do the solution of given link.
is how its look like when I override ToolStripDropDownBackground

WP8.1 Opaque hidden AppBar/CommandBar

How do I achieve opaque CommandBar/AppBar while it's hidden in WP8.1? CommandBar's property Opacity works just fine, but only when AppBar is opened. Though even then you can see non-opaque rectangle at the bottom. I want my AppBar to be opaque at all times, even when ClosedDisplayMode is set to Minimal.
[UPDATED]
"This happens because when you create a CommandBar an automatic margin is created for the ContentGrid to free a space below it for the app bar. Give the Main Grid a bottom margin by -24 and your content will show behind the command bar Like this: Margin="0,0,0,-24"
[ORIGINAL COMMENT]
I guess it is not applicable to do it with the control itself. But the workaround is to give it an opaque color. You can give the command bar a color but reduce its alpha value that controls the color's transparency.
Example: that's the Color code of the "Red" color with 80% transparency: #CCFF0000

C# Windows Forms, painting combobox borders

We need to show our disabled comboboxes as an image. The image has the same height as the standard combobox, but for some reason it cannot override the borders of the combobox.
Instead, it end up looking like this:
We would like them look like this image, i.e. that the image is shown on top of everything - including the combobox borders:
Any ideas?
Thanks.
First of all, what you are trying sounds really dirty - the best way would be, if your ComboBox would just look like your image as soon as you disable it!
If there is really no other way:
Create a PictureBox in front of your ComboBox. Set the image as the PictureBox's image, make it Visible whenever you want to "disable" your ComboBox.
But again, using controls to simulate behaviour you would expect to be part of another control is dirty.
Get the location of you textbox, set it invisible, then a the same location place an imagebox

Active TabPage has same color as my controls

I have made a TabControl and want to use some controls (labels, textboxes, buttons and combobox drop-downs). The problem is that when I select a tab, the default background color is not the same as the default background color of the form the controls used to be on. The color of the tab and the controls are too similar and it doesn't look good.
I have looked, but people seem to say that it's impossible to color tabs. What is a good solution to this? Should I put some kind of frame, label or something else inside the tab to make the background darker?
It's easy to get your tab pages to use the same background color as your form:
Make sure that the TabPage you want to change is visible in the designer. Click on it to select it.
In the Properties Window, find the UseVisualStyleBackColor property, and set it to False.
And as a bonus, once you've set this property to False, you can specify any background color that you want for the TabPage using its BackColor property.
The reason that this works is that you're forcing the tab page not to render with visual styles (i.e., themes as defined by Windows). The default theme actually paints tab pages a slightly lighter shade of the color used to paint other 3D elements (like forms and buttons). The problem (under the Aero theme in particular) is that the color of the standard 3D elements is so light already that the tab pages almost look white!
If you're satisfied with the contrast of the controls against the standard background color of your form, I suggest that you simply set the UseVisualStyleBackColor property to False and leave it at that without specifying a custom background color. Respecting the user's default theme is generally the best practice, rather than trying to skin an application yourself.
EDIT: Note that this will not change the color of the tabs themselves at the top of the TabControl. To do that, you're going to have to specify it as owner-drawn and handle its DrawItem event, forcing you to do all of the painting yourself. In most cases, however, this is not necessary.

width of the dropdown arrow

So in winforms, every dropdown combobox has this little arrow thingy to the right that tells the user it's a dropdown, kinda like this:
Now how do I figure out how wide that is in pixels? Reason is, I'm using ControlDrawToBitmap, this doesn't draw the text properly for the combo boxes, and I can redraw the contents, I just whack some of the arrows (which are drawn properly).
First idea that comes to mind: Check to see if the combobox button width tracks with the scrollbar width. The scrollbar width can be modified in user preferences. Use GetSystemMetrics() API to get the width of the various scrollbar pieces. If you change your system scrollbar width and it does not affect the size of a normal combobox, then ignore this.
Second idea: use the edit control's formatting rect to find out what the edit control thinks is the usable display area (minus the combo box). See EM_GETRECT in MSDN.
However, it sounds like this is just a hack workaround for your real problem: If you could get the controls to draw correctly to bitmap, then you wouldn't need this hackery.
I calculated it to be 9 pixels wide in photoshop

Categories

Resources