DTPicker Not Visible with ElseIf

  • Hi,


    I have an ElseIf statement that works for a textBox, but when I used a DTPicker instead of a textbox, doesn't work; it will follow the visible=false statement, but won't become visible again after changing the value back to a visible=true value.


    here is the code I have txtOvernights box



    basically I am using the DTPickers to count the number of overnights in a span date span, but you can manually input overnights into a separate textbox (txtOvernights), then I want the dtpickers to be unseen on the form.


    I read that ms calendars are glitchy, or is there something i am missing in the code?

  • Re: DTPicker Not Visible with ElseIf


    Hi,


    at first sight nothing is wrong with the code. I've tested your code and indeed I've got the same problem. Interesting problem :)


    I've checked a few things and this should solve the issue:
    (add me.repaint after your code and it should work)



    Apparently you have to do a repaint when you use this method.


    Hope this helps.

  • Re: DTPicker Not Visible with ElseIf


    wow. seems like an easy enough solution. thanks for the suggestion, it was driving me crazy. good fix.:)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!