Thanks for the info about setting dev mode in _config.php - I've done it when using _ss-environment.php, but not in config before.
After a bit more digging around (and chatting with a dev friend) I managed to sort it out. There's a function in the DropdownField class called setEmptyString(), which does exactly that.
My code is basically for a 'Latest Posts' widget. I want the user to be able to filter the latest posts by Category (I'm using the blogcategories module: https://github.com/IOTI/silverstripe-blogcategories). However, I wanted the first value in the dropdown to be 'All Posts'.
For anyone who is interested here's the code I'm using:
public function getCMSFields() {
$categoryDropdown = new DropdownField(
'BlogCategory',
'Choose a Category',
Dataobject::get("BlogCategory")->map('ID', 'Title')
);
return new FieldList(
new TextField('WidgetTitle', 'Widget Title'),
new NumericField("NumberToShow", "Number to Show"),
$categoryDropdown->setEmptyString('All Categories'),
new TextField('ReadArticleLinkTitle', 'Read Article Link Title')
);
}
... And if you look at the attached screen grab you'll see what this looks like in Admin.