How to set a widget invisible?

I want to make some PtLable or PtText widgets invisible under some condition,how can i do for it?
Is there any flag to make the widget visble or invisible?
Please give me some adivice.Thanks very much!

PtUnrealizeWidget();