How to remove the black border of the selected item of wxHtmlListBox? - wxwidgets

Our class inherits wxHtmlListBox, and it overrides both GetSelectedTextColour and GetSelectedTextBgColour to customize the colors, because the default background color of the selected item on Windows is light gray, and the bigger background is white. They make it difficult to visually tell which item is selected.
After overriding the two methods, though everything works good, there is an ugly black frame encompassing the selected item. The black frame also appears in the official example htlbox.
To recreate the problem, please follow these steps
Run htlbox.
Uncheck [Listbox | Draw seperators] to dismiss the distraction.
[Listbox | Set selection background... | (Choose a color) | Select]
and the ugly black frame appears, encompassing the selected item.
How do we remove the black frame/border? Any suggestion? Thanks.

Related

Is there an API to change the PowerPoint slide show window background color from black?

When a PowerPoint presentation is run in a slide show window that is not the same aspect ratio as the presentation design, black bars appear at the top and bottom or left and right (depending on the window size). For example, when presenting a 16:9 deck on to a 4:3 display, black bars appear above and below the content.
I am trying to change the default color from black.
The VBA object model for SlideShowWindows does not appear to have a property to do this.
I have checked the Win API for SetSysColors (user32.dll) and this doesn't appear to affect the slide show window background color either.
Is there a way to override this color?
There's no way to change the black bars that appear in this situation.

How to make a "within window" transparent/blurry title bar using a custom base color in Yosemite?

I've been playing around with NSVisualEffectViews in Yosemite and transparent titlebars but I was wondering if it's possible to have a custom title bar, with my own base color (not that gray), that would act like Apple's.
Here's my current NSWindow:
I achieved this look by setting the following code on my custom NSWindowController:
self.window.styleMask = self.window.styleMask | NSFullSizeContentViewWindowMask;
self.window.titleVisibility = NSWindowTitleHidden;
self.window.titlebarAppearsTransparent = YES;
That blue color is just a custom NSView that's painting its rect with that particular color. The content below it is a NSTableView.
So, the goal was to actually have my titlebar to work like, let's say, Maps but instead of having the "base" color as the gray color, my "base" color would be that blue one and when the NSTableView scrolls, that content appears below my title bar.
Any ideas on how to achieve this? Thanks
Have you tried setting a blue color with a transparency of, e.g., 0.75 in the blue view, and a NSVisualEffectViewunderneath it?

How to change tab bar tint for multiple tabs in iOS 7

I have three sections in my app, each section has different tabs.
I was wandering if there is a way to change the tint on the selected tabs to different colours for each section.
For example,
Section one tabs selected tint colour set to default blue.
Section two tabs selected tint colour set to Green.
Section three tabs selected tint colour set to Red.
I know through storyboard file inspector you can change the global tint but can't seem to find an easy straightforward way for three sections of tabs.
Thanks
Each "tab" is actually the tabBarItem of one of your UIViewControllers (the children of the UITabBarController).
So look at the properties of the tabBarItem, which is a UITabBarItem. Notice that there is a selectedImage, different from the image (inherited from UIBarItem). So give each tab bar item an image and a selectedImage, and give that selectedImage the color characteristics you want (and make sure that you derive from it an image whose rendering mode is UIImageRenderingModeAlwaysOriginal so that your color is used, and not, as you say, the tint color).

XAML Theme Brushes - Switching Dynamically, cursor doesn't change

First Off, I found this extremely useful page on theme brushes:
http://metro.excastle.com/xaml-system-brushes
So Roughly, on startup for WinRT/XAML I am setting my theme brush for a textbox in a stylesheet:
Foreground = TextBoxDisabledForegroundThemeBrush
Background = TextBoxDisabledBackgroundThemeBrush
Which at run time makes the textbox appear as: white border, transparent background and grey text. Which I was hoping it would make it transparent, white border and white text.
On my Tapped event, I change the textbox to:
Foreground = TextBoxButtonPressedForegroundThemeBrush
Background = TextBoxButtonPressedForegroundThemeBrush
Which is supposed to be black background, white text and white border. Which seems right, but the cursor is back and you cannot see it.
First question is, am I doing this right to change my text color? I want to change the textbox so once it is selected it stays a changed color. I think this is correct. But I am not sure if I should be setting Foreground or maybe a Font Style instead?
Unfortunately you can't change caret color so if you want your TextBox editable - you should keep the background white or otherwise light. Otherwise, controlling the look of your control in its various states is best done using VisualStateManager and that is easiest to manipulate using Blend.

Background color of NSSearchfield not working

I have a NSSearchField and I want to change its background color but i am not able to do it i tried out few things:
1) I tried to set DrawBackground TRUE and then setBackgroundColor but the value of DrawBackGround is always False either I try to set it trough code or Nib.(i don't know why?)
2)I tried out setting NSText's BackgroundColor but it is not looking good because it is not covering whole NSSearchField the extreme corners where the small search icon and cancel icon is present are left uncolored.
3)I want the searchField to have the color of the view it is lying so i decreased the alpha value of the searchField which looks good but the alpha value of text is also decreased so is there any way to make text's alpha value to remain always 1.
Thanks :)
If you look at the documentation, Apple prevents background color rendering for rounded-rectangle fields:
"In order to prevent inconsistent rendering, background color rendering is disabled for rounded-bezel text fields."
https://developer.apple.com/library/prerelease/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSTextField_Class/#//apple_ref/occ/instm/NSTextField/setDrawsBackground:
NSSearchField is extension of NSTextField, NSTextField again extension of NSView,
Not sure, but its possible to make a custom clas and overwrite drawRect function and paint with the background color.