A method for operating an electronic device, the method including: displacing a rollable touchscreen to a first position along a first direction, a first side of the rollable touchscreen being mounted in a housing, the rollable touchscreen being configured to be rolled into or unrolled out of the housing along the first direction, detecting an active electrode at a first location on the rollable touchscreen, the active electrode being mounted in the housing, and determining the first position of the rollable touchscreen based on the first location, the first positing being indicative of a fractional amount of the rollable touchscreen outside the housing.