Resetting a custom made color table - ocean

I have made some custom property versions with corresponding custom color tables. Everything seems to work quite well. However, when I select "Reset the color table" in the color tab, Petrel does not set the values to my default values, but to some unknown color sceme.
Does anyone know how it is possible to make Petrel reset to my custom made color table default values? This is on Ocean 2010.
Best regards
Odd Marius Aakervik
Blueback Reservoir AS

The Reset color table button on the Petrel interface will set the color table to the Petrel default for the template associated with your Property. You cannot use this button to reset colors to a custom property version. What you need is a custom template. This is not available in 2010. In the meantime, you can introduce a context menu entry on the Property objects to set the object's color table to your default... or wait for the next version of Petrel.

Related

Get color of the task bar in Microsoft Project (VBA)

It's well known in Microsoft Project VBA how to change the color of a task bar using typically:
GanttBarFormatEx TaskID:= CurrentId, GanttStyle:=7, MiddleColor:= myColor
However... i'm looking for a property to get the actual color instead than changing it. I looked into the Microsoft Project VBA reference but failed to found any information.
Thanks for your help
Vincent, Unlike Excel Project doesn't expose the ability to read format colors be they in text or for Gantt Bars. What I normally do is use a indirect method which is to uncover the criteria that set the color and thereby deduce the displayed color. If the color was set by the whim of the user, you're stuck, but normally that user set some criteria (e.g. field value or combination of field values) and you can test for that.

How do i manipulate the data templates inside listbox in uwp

I am making a chat application using XAML in UWP.The side panel is consisting of users. like this.
Everything is in Listbox in which I have this template that consists one ellipse as a circle which is like an indicator,one user image,textblocks and one toggle switch.I have to give states to the toggle switch in on the state it should change the green color of circle and make it red.
I want to give this functionality in code c# in MainPage.cs. I made the object of toggle in toggled Event Handler but I am not able to access the other elements inside the data template like ellispse,textblock.
What is the other alternative way of doing this?
NOTE: It has to be in listbox because I want to use the same template for every user.
The best way to do this would be to use data binding.
You would define a ViewModel class for the item, which would contain a bool property and would react to the toggling of the switch in the setter or have a Command which you would execute when the state event changes using behaviors.
If you really want the code as a event handler on main page, you have some options. To get the item associated with the toggle, you can use its DataContext property and cast it to the data type you are using. Alternatively, you can use Visual Tree Extesnions provided by the UWP Community Toolkit. This enables you to find the parent (probably Grid) where you store all the item controls and then manually find the user image, TextBlock, etc.

How to override system default label forecolor in VB.NET

Is it possible to change the "default" forecolor of a label?
I know I can change each control one-by-one in either design time or run time but I wonder if there is a better way.
I can do this at run time
lblCompanyName.ForeColor = color.darkblue
I could also have a loop to look at all of my controls on the form and change them in one small bit of code, but there must still be a better way.
I see at design time that the "default" label forecolor is "ControlText" so can I change ControlText perhaps to equal color.darkblue and then all of my labels will be dark blue without needing to code it one control at a time (or within a loop).
Thankyou
David.
You can't change it for a standard Label control but you can always create your own class that inherits Label and then sets the ForeColor property in the constructor. You would then use that control instead of a Label.
EDIT:
If you want to change the text colour for all your Label controls at run time then you should use a bound application setting. On the Settings page of the project properties, add a setting of type Color with User scope and name it LabelForeColor or something else if you prefer. Now, select a Label in the designer, open the Properties window and use the (ApplicationSettings) -> (PropertyBindings) node to bind the ForeColor property to the setting you created.
You can then access that setting in code via My.Settings.LabelForeColor and any Label bound to it will be updated automatically. You can bind as many different Label controls on as many different forms as you like. You can only bind one at a time though, so I would recommend copying and pasting an existing bound Label rather than adding a new one each time. If you have existing Label controls and you're confident enough, you can copy, paste and edit the binding code in the designer code file(s).
There's really no point your using a custom control in this case because the setting will control each control anyway. No matter what value you set in the constructor, it will still be set by the bound setting afterwards. Note that any change you make to a setting will be automatically saved at shutdown and reloaded at startup.

Best way to change font properties in lightswitch

How can i change Label font properties (size, font and color) for any screen item i have ??
i found an extension that can give me some properties to play with (Pixata Custom Controls for lightswitch)
the problem with it is that i can change only data properties i cant play with the label style itself
for example if i have textbox screen item lightswitch will generate a label and a text box for me in the Pixata extension i can only manipulate the texbox but not the label
so what is the best way to manipulate font properties in general and label font properties in particular?
I found the answer from BethMassi in her awesome blog which was as follow
You can select the style in the properties window for the control on the screen designer. Controls support basic Normal, Warning, Heading 1, etc. styles. If you want to change all colors, fonts, etc. then you need to create or download a theme. If you just want a single control to show in a different font/color then you can create a custom control.
thanks a lot beth
Thanks Everyone :)
3oon

How to add a tab in the color palette

Hello
I am working in VB.Net 2.0 windows forms.
A color palette occurs on click of backcolor of any control. I want to add a new tab in this palette. In the new tab, I want to add the new colors as per the requirement.
The actual dialog is a private class named ColorUI, nested inside the System.Drawing.Design.ColorEditor class. That prevents you from altering it.
You'll need to create a complete replacement for this UITypeEditor derived class. You can get implementation hints on getting this right by using Reflector. Beware that you cannot override the [Editor] attribute on existing controls, your new version of the dialog will only be usable on your own custom controls.