I have an extension of Color that stores a colour variable. I am currently using this to set the main colour for the whole app, which currently works.
extension Color{ static var colour: Color = Color.red }
If I set it to red everything turns red. But at the moment I have to hard code what colour it will be. I want to be able to modify this colour during runtime.
I have tried to modify the extension at runtime but I can’t seem to get it working and I’m not sure if it allows you to do this. I’m not sure the best way to approach this.
If anyone has anyway of changing the variable in an extension that would be ideal but if there’s another way, any help would be greatly appreciated. If you have any questions or I haven’t explained something clearly ask away.
Thanks so much
Related
a bit background
I am currently using the clHighlight color together with a StyleServices.GetSystemColor call to set the background color of controls that are:
not focused
have a NULL value (field.IsNull=True)
and are about a required field (field.required=True)
Its not about how to do the highlighting itself, I figured that out already.
Currently I am using system color clHighlight, but this makes confuses my users as they think the entire contents of the field is selected (see screenshot).
But I also have style support implemented, so using a custom predefined color is not really what I am looking for. after googling a bit I found quite a list here https://learn.microsoft.com/en-us/dotnet/api/system.windows.systemcolors?view=netframework-4.7.2 but I am unable to find what I am looking for.
Using RAD studio Rio 10.3.1 Enterprise.
The actual question
So - what system color should I use? (not really looking for subjective suggestions, but for a more or less "officially recommended" constant to use.)
a screenshot
Answer: There is no more or less system color constant defined for this specific purpose.
Solution/workaround:
Thanks all for the suggestions. I decided to go for the clInfoBk constant (background color for hint windows), this looks far less confusing. One could interpret the color as a "hint" for fields that need to be filled out.
And it looks like this, in the default color scheme:
I've Googled around a lot, and I checked the Unity Asset store but I cannot seem to find what I think is a common problem (or perhaps I'm doing it wrong).
The issue is when I use the Sprite Editor I cannot see a reference image which is useful for setting the sprite pivot.
When I open the Sprite Editor on a given image file, I cannot seem to add a background reference image:
I want to be able to see a background image (of a specific character for example) that I can position and then use that to set the pivot.
Do you know of any way to do this? Asset Store references are acceptable.
I found one for Animation pivot setting but not for static images.
Any and all suggestions welcome (if you have a workflow suggestion that mitigates this issue, feel free to suggest :) )
I found a free option that works well enough:
http://gnupart.tistory.com/entry/Unity3D-Custom-Sprite-Pivot-Editor-in-SceneView
![enter image description here][1]please I need some help, this should apparently be something very simple and basic to do, but maybe I'm missing something.
I'm quite newbie to Unity3d, I had no much problem with creating a somewhat flashy 2.D scene (I mean 2D with different layers in Z level), scripts, etc. But I'm having trouble to create a "UI Slider" object: when I create it, it just shows nothing on screen. How can I make it visible? I just need to create a very simple, plain slider whose value can be controlled at runtime by means of a script.
thanks.
Well.. since you give nothing to go on, I suggest that you take a look at a tutorial for the UI:
https://unity3d.com/learn/tutorials/modules/beginner/live-training-archive/using-the-ui-tools
If you have troubles after this tutorial, come back with an example of your problem to make people more willing to sacrifice their time in helping you.
Hope this is somewhat useful
Take a look at the Unity3D docs here.
http://docs.unity3d.com/Manual/script-Slider.html
It should have what you are looking for.
I have my site created with Dashcode and I am using the List object but I don't like the default blue background when a cell is selected.
How can I customize this? For example change it to grey or white, etc.
(As far as i know, everything is customizable in Dashcode, is just sometimes you have to do it using code and not Dashcode UI.)
Thanks in advance.
Answer to my self:
looking at main.css I found something like:
.listRowTemplate_template.selected {
background-color: rgb(56, 0, 217);
}
Which is the color I want to change ;)
Which would have been my answer, shall i vote you up? ;-)
It is easy to forget that when in Dashcode it is "just" JavaScript, CSS and HTML and so many problems will often succumb to those type of solutions such as you have done.
I'm trying to draw a QRubberBand on a QGLWidget. For some reason the area of the rubber band is drawn as opaque and I don't see what's behind it. This kinda beats the purpose of the rubber band as a way to select stuff inside it.
I've seen in docs for QStyleOptionRubberBand that there's an 'opaque' member but I have no idea how to access this in the default style or how to change it.
Anybody ever done this?
Are you in Vista/Win7 with Areo on? If so, does it work when you turn it off?
EDIT:
How about Message #6?
"In the meantime I looked it up in the QT source code, and I noticed that the following will solve my problem: myQRubberBand->setWindowFlags(Qt::ToolTip);"
It would be great having any source code ?
But here are how I would attempt to fix the problem :
Subclass QRubberBand
Redefine PaintEvent method
call iniStyleOption to activate style options of your choice
Hope it helps !