1. A method for operating an electronic device, comprising: analyzing coordinates of touch areas to set an arbitrary area; checking that at least one object is included in the set area; and controlling a layout of the at least one object included in the set area according to a bending state.