locked
Multiple DateTime.Now instances RRS feed

  • Question

  • Hello,

    I apologize for my ignorance, but I'm having a hard time with using multiple DateTime.Now instances in my LightSwitch application. Here's what I'm trying to do:

    What I'm trying to do is display a date/time stamp when a user checks one of the boxes shown. As you can see, however, while the top box (Stage) works fine, the other boxes just give me an ellipsis (...) instead of a DateTime.Now.

    Here's the code I wrote for it:

    partial void SiteSurvey_Changed()
            {
                this.Transactions.SelectedItem.SiteSurvey = SiteSurvey;
                DateTime saveNow = DateTime.Now;
                if (this.SiteSurvey == true)
                    this.SiteSurveyCompleteID = this.Application.User.Name + " " + saveNow;
                else
                    this.SiteSurveyCompleteID = "";
            }

    This is for the Site Survey check box, and I have similar code for the "Changed" method of the other check boxes as well. Is there some kind of restriction that is keeping me from being able to use multiple DateTime.Now instances on my screen?

    Thanks,

    Sean

     

     

    Tuesday, June 4, 2013 3:04 PM

Answers

  • hi!

    on first look it seems that you have UI problem.. can you try manually to increase width (set pixel size on control properties) of specific labels and parent containers to see if it changes anything?

    Kivito


    Nobody expects the Spanish Inquisition! (M.P.F.C.)

    • Marked as answer by spsalsm Tuesday, June 4, 2013 3:23 PM
    Tuesday, June 4, 2013 3:17 PM

All replies

  • hi!

    on first look it seems that you have UI problem.. can you try manually to increase width (set pixel size on control properties) of specific labels and parent containers to see if it changes anything?

    Kivito


    Nobody expects the Spanish Inquisition! (M.P.F.C.)

    • Marked as answer by spsalsm Tuesday, June 4, 2013 3:23 PM
    Tuesday, June 4, 2013 3:17 PM
  • Holy crap, you're right...that's all it was. I really feel dumb now. I changed the horizontal alignment to "stretch" on the ones that didn't look right, and that's all it was. :S

    Thanks!

    Tuesday, June 4, 2013 3:23 PM
  • no problem! UI designer can drive people mad.. ;)

    cheers!

    Kivito


    Nobody expects the Spanish Inquisition! (M.P.F.C.)

    Tuesday, June 4, 2013 3:49 PM