Gillian Anderson had a relationship with a woman while she was in high school.

The former 'X-FILES' star has experimented with her sexuality in the past but says she was too attracted to men for her lesbian romances to go the distance.

She told Out magazine: ''I was in a relationship with a girl for a long time when I was in high school.

''If I had thought I was 100 per cent gay, would it have been a different experience for me? Would it have been a bigger deal if shame had been attached to it and all those things that become huge life-altering issues for youngsters in that situation?

''It's possible that my attitude around it came, on some level, from knowing that I still liked boys.''

The 43-year-old actress started to experiment with her sexuality after her family moved from London to a small town in Michigan.

Gillian - who has two sons, Oscar, five, and three-year-old Felix, with partner Mark Griffiths as well as 17-year-old daughter Piper from her marriage to Clyde Klotz - said: ''Going from London to a small Republican town like Grand Rapids was quite a shock. I thought it would be a place of sunshine and happiness and candy bars.

''Based on how I chose to look, dress, behave, you know -the relationships I was in at the time were freaking people out.''