Various GUI Elements Rearrangeable List

Hi all!

I am trying to make a system within the GUI wherein the user can add, remove and rearrange clumps of various variable types with of course various values.
I can very easily do this with one such element, for example an integer, by placing a class containing all the details of the integer(Title, editable or not, max, min etc) and making a list of that class, iterating through etc etc

The problem is how would I do that with various elements?
I thought of making one class containing all the different types of variables that any possible element could contain. Eg a string, int, bool etc

But I figured that would be a huge waste of unused variables!

Does anyone know a good way to go about this?

Here is what I ideally want:

Name: Alismuffin
Age: 99
Stuck: True

With each line being able to be moved up and down or removed and new lines added. Sorry if I’m not really explaining it too well >.>

Here is a class for a simple integer with a title:

public class Attribute
	public string _title = "Untitled";
	public bool _editable = true;
	public int _val = 0;
	public int _min = 0;
	public int _max = 5;
	public int _def = 0;
	public string _textFieldString = "0";
	public Attribute(string title, bool editable, int val, int min, int max, int deflt)
		_title = title;
		_editable = editable;
		_val = val;
		_min = min;
		_max = max;
		_def = deflt;
		_textFieldString = val.ToString();


You could make your default value type be a string and attempt to parse it as a float when the attribute loses focus. If it works as a float then you could store that value and flag the attribute as a numerical value, thereby relegating string parsing to only those instances where the value was edited. In a perfect world there wouldn’t be much else happening in that moment (of the user changing focus to another GUI element) and the CPU cycles would go unmissed.