How to make the data of a ComboBox depend on the selected item in another ComboBox?

How to make the data of a ComboBox depend on the selected item in another ComboBox?

Hello,
I am working on a project where I have a combobox that depends on the selected value in another combobox.
For example I would like to have a comboBox with Male and Female gender.  Then depending on the selected gender, my second comboBox would have men or women.
I would like to know how I can apply this in my project?