It is indeed working in your example, due to the method how structs are generated, but this is not the 'official' way. In C, variables can only be initialized with constants, not with other variables. You need a function for setting panel variables dynamically from the content of other variables.