You must first define the settings for your feature. After you install your feature as described in the hello world article, you can then define settings and set default values from the UI at Administration > Advanced Tools > Feature Installation/Configuration > Your Feature > Settings.
Once the setting is defined, then there is already a UI to set the instance specific values. If you have
<portal:ModuleTitleControl EditText="Edit" runat="server" id="TitleControl" /> in your Feature then when you put it on a page you will see a link for "Settings" and if you click it you will see where you can set the setting you defined on your feature.
So you don't really need to set settings from inside your feature there is already a page to set them, you can use them in your feature, ie read theior values like this snippet from the Google Maps feature I told you to look at:
if (Settings.Contains("GoogleMapInitialMapTypeSetting"))
{
string gmType = Settings["GoogleMapInitialMapTypeSetting"].ToString();
try
{
mapType = (MapType)Enum.Parse(typeof(MapType), gmType);
}
catch (ArgumentException) { }
}
As I said before "Settings" is intrinsic to SiteModuleControl, it is already there for you.
There are also helper methods to convert values in Settings to specific types like:
useLocationAsCaption = WebUtils.ParseBoolFromHashtable(
Settings, "GoogleMapShowLocationCaptionSetting", useLocationAsCaption);
mapHeight = WebUtils.ParseInt32FromHashtable(
Settings, "GoogleMapHeightSetting", 300);
Where you can pass in a default value in case it is not found in the settings, that is what the 3rd parameter is in these methods.
Hope it helps,
Joe