Both Perry and Gramm had to run for office and win as Republicans. And I would suggest that Perry is not the best example for you to cite.
The point being that almost everyone with any ambition in Texas ran as a Democrat until the 1970s, and most of them through the 1980s.