I am just curious, if a person tries not to gamble in front and all of a sudden kids notice you gambling, what will be his next step? That person stops gambling? Explain? Continue after saying something like "go to your room".
I think that few parents initiate a conversation about gambling with the purpose of explaining why they do it. Usually such conversations happen situationally. Either there is some external example that entails such a discussion, or the child catches the parent in the act of gambling. In any case, I believe that the parent should be much more interested in building a trusting relationship with the child, which is impossible if the child is simply forbidden from something without explaining the reasons. In the long run, the parent who is in dialogue with the child will win.