How to change x and y axis's black text color?
I have tried changing every black color in every xaml file in WinRTXamlToolkit.Controls.DataVisualization namespace.
Any suggestion is highly appreciated.
If you Ctrl+Shift in the sample app - you'll see the TextBlock is inside of a NumericAxisLabel and when you search the code - you can see that it's created by NumericAxis.CreateAxisLabel(). One of its base classes - DisplayAxis has a AxisLabelStyle property you can use to apply a style to that label, so if you set that in your chart - you can use a style that specifies a setter for the Foreground property with a different brush.
Related
I'm having the hardest time trying to figure out how to style the font colors so that it's different than the task bar. Based on my research it looks like the only thing you can really do is pass in an array of colors into options:palette where the library will rotate the colors based on the resource column assigned to the data. This changes the color of the font and the task bar, but you can't configure it differently.
Based on the google documentation https://developers.google.com/chart/interactive/docs/gallery/ganttchart you should be able to. The font part works but not the color. Looks like it gets override by the pallete color
Any advice appreciated.
Thanks
Derek
I am using the latest quasar framework. I want to change the colour and font size of the stacked label in a q-input field.
Changing the in the css doesn’t seem to take effect. Any local styling apply only to the input text and not to the label.
how to solve this problem?
Thanks,
Priy
I'm in the process of writing my first Hello World application for iOS, and I don't know even elementary things, so I'm sorry if this question will be stupid. I want to change the background image of button. But when I do this button changes its shape and becomes squared instead of Rect Square (with non-zero corner radius). So the question are there some ways to change background and preserve button's shape either directly by Interface Builder or by manipulating XML-like language in .xib files or whatever other way.
Add a button and set its type property to custom. With this method you could define an image for the button as you would like it to be displayed not just the background within the rounded rect.
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.
I'm trying to show the "selection" of a certain sub-string in a
gtk.TextView by drawing a border around the word. The only way to mark
text in a TextView that I've found so far is by placing TextTags with
modified properties. This does not seem to offer a way to draw a border,
though, DOES GTK SUPPORT THIS OR IS THIS A PROBLEM WITH ONLT PYGTK
I figured out how to draw on a text view !!!
To begin with lets assume the reference to your gtk.TextView is in a variable called viewer, Inside one of ur classes
Also the draw function has to be called with an event called expose-event else the drawings will be refreshed and will not stay on the screen
The next part is the gtk.TextView consists of 7 types of gtk.gdk.windows on which u can draw
gtk.TEXT_WINDOW_WIDGET
gtk.TEXT_WINDOW_TEXT
gtk.TEXT_WINDOW_LEFT - not displayed by default
gtk.TEXT_WINDOW_RIGHT - not displayed by default
gtk.TEXT_WINDOW_TOP - not displayed by default
gtk.TEXT_WINDOW_BOTTOM
gtk.TEXT_WINDOW_PRIVATE
For the drawing to appear on gtk.TextView We have to draw on gtk.TEXT_WINDOW_TEXT
An Example Code is as shown Below
if(viewer!=None):
viewer.connect("expose-event", expose_view)
self.drawable=viewer.get_window(gtk.TEXT_WINDOW_TEXT)
def expose_view(self,window,event):
if(self.drawable!=None):
self.drawable.draw_line(self.drawable.new_gc(),1,1,30,30)
# (1,1) and (30,30) are the coordinates and u can give the values accordingly
In a gtk.TextBuffer tags are used to set one or more pre-defined text attributes. Without subclassing, this is limited to the properties of a gtk.TextTag, and doesn't include anything akin to a border or outline property. There is no difference between PyGTK and plain GTK+ in this regard.
While somewhat hacky, the easiest way to do what you want to do is to connect to the expose-event of your gtk.TextView, get the coordinates of your string and draw on event.window, which is the gdk.Window of the event provided in the expose callback.
(Note that you don't have to get and store the gtk.TEXT_WINDOW_TEXT window, you just need to check what window the expose event is for in the callback, probably ignoring the expose if it's not for the text window.)
Instead, you could presumably subclass one or more of TextBuffer/TextView/TextTag to add a border tag, but whether it's reasonable to do so is another question.