Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Theme anomalies

Datepicker on window 1, set with a specific theme.
Open unrelated window 2 with a different datepicker and different theme and the datepicker on window 1 changes it's theme too match or at least partially match the new theme defined on window 2.



Just to add to the confusion and because it may have some relevance. I've actually tried to apply the same theme to the first datepicker but it doesn't show and I haven't figured out why. This anomaly came about simply because I was testing themes with different windows/datepickers to verify my code before asking if themes actually work.

Comments

  • The same symptoms occur though whether or not I explicitly set the theme in window 1.
    It works both ways as well. In the above scenario, if I then close window 1 and then restart it, it reverts back to the first picture but so does the datepicker in window 2

  • Mark - As mentioned recently, Kevin is on holiday so I'm going to do my best to pinch hit for him on what I believe is going on. As you doubtless know, many of our controls come from a third-party library. The DatePicker is among them. One caveat with this third-party library is that themes cannot be customized per control. There is underlying logic that unifies the theme. I suspect this is at the root of what you are experiencing. Does this seem to fit your situation or do you suspect something else is going on?
  • That's a sufficient explanation. I was only thinking to use the theme in this instance to represent a mode. If it's going to have an additional effect then I'll simply do it another way.
  • Don, I retract that last statement. Something else is going on.
    I've just noticed the same symptoms occur but without the middle datepicker control being set.
    Take the left and right images of my first post. I start with a datepicker looking like that. In this instance I just started a simple dialog box containing an editline and a couple of checkboxes, no ole controls at all, and when the dialog box closed, the datepicker changed to look like the image on the right. Not explicitly setting the theme anywhere.

    I'll give my machine a rest over the weekend and revisit on Monday. Perhaps my machine is just overworked.
  • Mark - Do you have a custom background setting for the form itself?
  • Mark - I can confirm that some themes (not all of them) are stored within the OCX resource. Only one resource can be loaded at a time. So, using the Office 2007 theme, for example, will cause all CodeJock (the 3rd party we mentioned earlier) controls to use the same theme. CodeJock controls include the DatePicker, Calendar, Report Table, and Ribbon.

    Are you explicitly setting the background of your dates to white in the left-most screenshot? That would explain why they are white in the right-most screenshot as well.
  • All codejock controls, not just like controls.
    So setting the theme for a reportable for example (as I have in this window) also affects the theme for the datepicker?
  • Only for Office 2010, Office 2007 and Windows 7 themes are resource based for the DatePicker. All other DatePicker themes do not rely on resources and can therefore be different from other CodeJock controls.
  • Does anyone have some simple code examples of using SRP's DatePicker, I have the latest version of DatePicker, I just want to popup the Calendar using a click event off a PB on an OI form. I have not used the DatePicker as yet was wondering if there is a cheat sheet. I have looked at the online documentation but could not find any 'real-life' examples. TIA.
  • Does anyone have some simple code examples of using SRP's DatePicker...
    I suggest you create a new thread for this subject rather than piggy pack on a very different topic. We'll help you as best we can in that thread.
  • Because I only just noticed something, I'm guessing the popup control is included in this list?
  • Correct, so long as it is set to a resource based theme, i.e., Office 2010, Office 2007, and Win 7 themes.
  • Bingo! Office2010Blue.
    So whenever I display a message to the user I could be changing the appearance of other controls.

    Might customise the popup myself then.
Sign In or Register to comment.