Guidance
指路人
g.yi.org
Guidance Forums / Reginald Rexx / Using CALENDAR

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. Using CALENDAR
#13120
Posted by: DougA 2009-09-29 01:16:40
I'm trying to use the CALENDAR and the only event that "activates" is the RELEASE event, trouble with this is, the date that's returned is the previous value and not what's currently been clicked on.  If you're sitting on the day you want, then click the month advance, it reports correctly.

The two events that the doc describes  SELECT & SELCHANGE that should give the clicked on date, don't respond.

Am I missing something here ?
Doug
Message2.
#13121
Posted by: Jeff Glatt 2009-09-29 03:01:43
Doug,

Can you post your test script? It'll save me the time to write my own.
Message3.
#13123
Posted by: DougA 2009-09-29 21:39:28
/*
GUIBEGIN


WINDOW , 360, 173, 219, 186, POPUP|CAPTION|SYSMENU|MINBOX|MAXBOX|THICK, , Date
   FONT 8, 400, MS Shell Dlg
   TEXT 39, 24, 54, 12, GROUP, , , , Enter mm yyyy
   ENTRY 97, 23, 75, 12, H_AUTO|BORDER|TABSTOP, , MoYrEntry
   PUSH 76, 161, 58, 16, , , Close, , Close
   CALENDAR 35, 50, 140, 100, NOCIRCLE|NOTODAY|BORDER, , CalDisplay
DEND
GUIEND
*/

LIBRARY rexxgui, RxConsole

GuiErr = "SYNTAX"
GuiHeading = 1
GuiCreateWindow('NORMAL')


Again:
DO FOREVER
   GuiGetMsg()
   IF EXISTS('GuiObject') == 0 THEN DO
      IF EXISTS('GuiSignal') THEN DO
        If GuiSignal = 'CLOSE' then leave
      END

   END

   CATCH SYNTAX
         CONDITION()
         SIGNAL Again

   CATCH HALT

   FINALLY
      GuiDestroyWindow()
END
RETURN

WM_UNFOCUS_MoYrEntry:
  GuiGetCtlValue('MoYrEntry')
  Parse var MoYrEntry ReqMo ReqYr .
  If ReqYr = '' then Return
  CalDisplay = ReqYr||ReqMo'01'
  GuiSetCtlValue("CalDisplay")
RETURN

WM_CLICK_Close:
  GuiWake("CLOSE")
RETURN

WM_SELECT_CalDisplay:
  Say 'CalDisplay SELECT'
RETURN

WM_SELCHANGE_CalDisplay:
  Say 'CalDisplay SELCHANGE'
   RETURN

WM_GETDAYSTATE_CalDisplay:
  say 'CalDisplay GETDAYSTATE'
RETURN

WM_RELEASE_CalDisplay:
  SAY 'CalDisplay RELEASE'
  GuiGetCtlValue('CalDisplay')
  Say CalDisplay
 
RETURN
Doug
Message4. I tested as well
#13124
Posted by: Michael S 2009-09-29 22:32:56
and saw exactly the same scenario as you mentioned Doug
Message5. Bump
#13504
Posted by: Michael S 2011-05-23 15:25:00 Last edited by: Michael S 2011-05-23 16:49:09 (Total edited 1 time)
Have a situation where I'd like to be able to use the calendar, but it's not good at the moment with the problems above.

Jeff. If you get the time to look at it, I'm also noticing that various days in the current month are highlighted in bold. If I scroll forward a month, and then back, the bold disappears.
Message6. Bump
#13566
Posted by: Michael S 2011-12-30 22:31:00 Last edited by: Michael S 2011-12-30 22:31:49 (Total edited 1 time)
I tried with the following code but that failed (ie, it did nothing). Any chance of a fix here Jeff ?

guierr = "SYNTAX"
guiheading = 1
guicreatewindow('NORMAL')
trace_code_limit = C2X(4)
guisendmsg("CalDisplay", "SETDAYSTATE", trace_code_limit)
I was hoping that one or more days would be marked in bold based on the 4 I tried to pass
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Fri 2024-3-29  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0