Announcement

Collapse
No announcement yet.

how to get rid of the page symbol in a datepicker display

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to get rid of the page symbol in a datepicker display

    I would like to get rid of an unnecessary symbol in a datepicker window. It looks like a page symbol as shown in the below image

    Click image for larger version

Name:	get rid symbol.PNG
Views:	80
Size:	102.2 KB
ID:	783977

    I hope that someone can direct me on how to get rid of this unnecessary symbol before the drawdown button.
    appreciate any help, the code for the datepicker is below

    Code:
    CONTROL ADD "SysDateTimePick32", hDlg, %DatePick, "", 0, 0, 0, 0, _
     %WS_CHILD OR %WS_VISIBLE OR %WS_TABSTOP, %WS_EX_CLIENTEDGE OR _
       %WS_EX_LEFT OR %WS_EX_LTRREADING OR %DTS_SHORTDATEFORMAT
    Probably need to add a style to remove this symbol?

  • #2
    -Removed, I misunderstood the question.
    -Dave solution below is more appropriate

    Last edited by Pierre Bellisle; 16 Aug 2019, 10:47 AM.

    Comment


    • #3
      Tim,

      That icon is a feature of a themed DTP control (CommCtrl.inc v.6)

      Add #Include "UxTheme.inc" to the top of your source and this line to set the DTP to non-themed
      Code:
       CONTROL ADD "SysDateTimePick32", hDlg, %DatePick, "", 0, 0, 130, 100, _
         %WS_CHILD OR %WS_VISIBLE OR %WS_TABSTOP, %WS_EX_CLIENTEDGE OR _
         %WS_EX_LEFT OR %WS_EX_LTRREADING OR %DTS_SHORTDATEFORMAT
      
       hDatePick = GetDlgItem(hDlg, %DatePick)
       SetParent(hDatePick, hListview)
       ShowWindow(hDatePick, %SW_HIDE)
       SetWindowTheme(hDatePick, " ", " ")  ' << Turn off theme
      Rgds, Dave

      Comment


      • #4
        Also note that the calendar icon symbol will auto disappear if the width of the control is too small to show it.
        You can test by reducing the column size...

        Comment


        • #5
          Thanks to both of you, it now work fine without that calendar icon using Dave's method

          Comment

          Working...
          X