Setting widget properties and events