Create a greyed out value field in the editor?

I am writing an editor window to help me automate some tasks. Basically, in some cases I want to create a greyed out (non-interactive) field instead of the regular one, if changing the value doesn’t make sense.

Here’s an example from the Unity preferences window:

I could not find any clues online, but I imagine it can be done in a custom window as well. Any clues?

I was able to find the answer. Basically, set GUI.enabled to false, and then back to true after displaying the field(s).

GUI.enabled = false;
// Your greyed out GUI
GUI.enabled = true;

For others, probably the best solution is EditorGUI.BeginDisabledGroup(bool)