• Welcome to TodayPlus Boards v2.
 

Pop up Calendar

Started by ya1950, October 21, 2004, 10:26:55 AM

Previous topic - Next topic

ya1950

Here's the problem. I'm trying to create a pop up calendar with buttons to change the POOM date. The calendar will pop up over the agenda region and disappear once the date has been chosen. The problem I'm having is as follows: I can clear the screen under the calendar but if I use deactivate for the region I can't use the calendar buttons. If I don't use deactivate the region's POOM buttons interfer with the calendar buttons.

I've tried to create another region above the agenda region and have the calendar overlay the agenda region. This works for the calendar day buttons but I'm also trying to scroll the month. When the month is scrolled the part of the calendar that overlays the agenda region becomes transparent since it is in a different region. I'm attaching a sceen shot to make this clearer along with the code. Anyone have any ideas?


///////////////////////////////////////////
//// POP UP CALENDAR - REGION 2,4
//////////////////////////////////////////

region,2,4

offset,offset_-1,offset_-1

offset,offset_-1,offset_-1

image,2,0,calendar.png,t
button,2,0,20,17,2,4,4,1

image,180,0,taskbar agenda button.png,t
button,180,0,20,17,2,4,1,-1
button,180,0,20,17,-1,23,0,-1   //CLEAR OUTLOOK CACHE 0 = CALENDAR 0

image,200,0,taskbar task button_off.png,t
button,200,0,20,17,2,4,4,-1

image,220,0,taskbar countdown button_off.png,t
button,220,0,20,17,2,4,3,-1
button,220,0,20,17,-1,23,0,-1   //CLEAR OUTLOOK CACHE 0 = CALENDAR 0


offsetadd,0,21

image,2,0,calendar-today.png,t
button,2,0,16,16,-1,0,%apps-2-5

imagebutton,200,0,refresh agenda.png,t,2,22,-1 // OUTLOOK NOW
button,200,0,13,13,2,23,0 // CLEAR OUTLOOK CACHE 0 = CALENDAR 0
button,200,0,13,13,2,10,0 // RESET CALENDAR 0

calcvar,var22,firstoutlookday
calcvar,var22,-,%var22%,1
imagebutton,182,0,arrow_left.png,t,2,25,var22,1 // SCROLL POOM BACKWARDS
button,182,0,12,12,2,23,0,

calcvar,var23,firstoutlookday
calcvar,var23,+,%var23%,1
imagebutton,222,0,arrow_right.png,t,2,25,var23,1 // SCROLL POOM FORWARD
button,222,0,12,12,2,23,0,


offsetadd,20,0

options,calendarfilter,1
options,dateformat,3,15,18,%bold%%date,dddd MMM. dd%%regularfont%
//button,20,2,120,12,1,4,1-highlight,1 //GO TO CALENDAR FILTER 2
//button,20,2,100,12,-1,23,0 // CLEAR OUTLOOK CACHE 0 = CALENDAR 0


options,blanktext,-1,12,12,-Nothing Further-

options,apptformat,0,13,13,%iconstart,-20%%categoryicons,0,3%%iconstart,-10%%recurrenceicon,0,3,recurrence.png,t%%starttime,h:mm%-%endtime,h:mmtt%%tab,80% %subject%%changefont,tahoma,13,i% %changefont,tahoma,13,%
options,apptallday,0,13,13,%iconstart,-20%%categoryicons,0,3%%iconstart,-10%%recurrenceicon,0,3,recurrence.png,t%%subject%
options-today-text,Today


changefont,tahoma,13,


outlook,2,1,238,140,0,0,,,,2 //OUTLOOK CACHE 0 = CALENDAR 0

offsetadd,-20,-21

//cleararea,2,12,90,100
//deactivatebuttons,2

changefont,Tahoma,11
image,2,12,popup_calendar.png,t
calendarheader,2,24,12
calendar,0,0,2,36,12,12,,t
button,1,38,84,71,-1,5,0-highlight,2 // CALENDAR BUTTON
button,1,38,84,71,-1,25,0,2 // SET CURRENT POOM DATE TO CACHE 0
button,1,38,84,71,-1,23,0,2 // CLEAR OUTLOOK CACHE 0
//button,1,38,84,71,-1,23,1,2 // CLEAR OUTLOOK CACHE 1
button,1,38,90,65,2,4,1,-1 // GO TO AGENDA PAGE 1
text,43,12,[caldate],0,c,"MMMMM yy"
image,5,14,arrow_left_small.png,t
button,5,14,8,8,5,9,0-highlight,-1
//button,5,14,8,8,1,4,2,-1
image,75,14,arrow_right_small.png,t
button,75,14,8,8,5,8,0-highlight,-1
button,75,14,8,8,1,4,2,-1
//button,75,14,8,8,-1,23,0,2

changefont,tahoma,12,

offsetadd,0,139

endregion,2,4

uk_skinner

I am not sure this will help you solve the problem, but...

I believe it is your intantion to keep just like PB.  The pop-up calendar overlap on the top of agenda area.  Why not pop-up at some other place, for instance the system status area.  In that way, 1) you don't have to close the calendar once you tap on the day, becuase I might want to see the agenda while I tap the day, 2) there is no overlap problem, you can just deactivatbuttons for the area cover by calendar, and you should be able to scroll the month without interefering with agenda.  However you do need a close button to close the calendar once it finished.

ya1950

Thanks. The problem is the calendar size. I don't want to shrink in much more because it becomes too small to use easily. Unless I redo the entire skin I don't have one region large enough to place the entire calendar image except in the agenda area. I tried to place the buttons for the agenda area in a separate region and to have the calendar as a page in that region. The calendar then overlapped into the agenda region that was immediately below it. It worked fine for the day buttons. But once I tried to scroll the calendar month I got interference from the agenda region that was below the calendar region - it began to show through the calendar image.

What I really want to do is turn off the POOM buttons in the agenda region and leave the calendar buttons functioning but I can't figure out a way to do that.

uk_skinner

ya1950,  Is there any way you can catch the screen while the problem happened?  

Based on my understanding, if you have created a seperate region for calendar and deactivated the agenda region, why the agenda will show or update when you scroll the month?

uk_skinner

ya1950, Question:

You comment out this code "//button,5,14,8,8,1,4,2,-1"  but did not comment out this "button,75,14,8,8,1,4,2,-1", any particular reason?

I don't see another region for pop-up calendar in your first post..?? :?:

ya1950

Sorry I don't have a copy of that version anymore but I can explain what happened. The region above the agenda, where I put the calendar and the buttons for the agenda region had a height of 21. The calendar is much larger than that. So even though it was a page in that region, the image itself overlapped the region immediately below it, the agenda region. I could then disable the buttons of the agenda region and all was fine. But ... once I tried to scroll the month, the days of the calendar were redrawn and since they were overlapping the agenda region, the text of the agenda and the days both began to show through the calendar image.

I guess I can rewrite the skin and reorder the regions but I really like the way it looks now and I'd like to use the pop up where it is if there is a way to do it.

That line you commented on is a mistake. It should be commented out as well.

uk_skinner

:wall:

In Hammerskin. Wichtel also got pop-up windows in the weather section.  The information in there also can be "scrolled".  Perhaps, you can get some idea from there.  You are right, perhaps you should consider rearrange the order of regions.  It is hard for me to picture the problem without codes to look at it... :oops:

ya1950

OK - thanks for a lot trying. :D  I did manage to reproduce the old code because I wanted to try something out (didn't work). Here is the code. The agenda region,2,1 is directly below this region. As long as I just click the day buttons everything works fine. But when I try to scroll the month I get the results from the screen shot. As you can see the month itself is fine since it sits in region1,2 but the days get messed up because they are overlapping region2,1 - the agenda region.


///////////////////////////////////////////
//// POPUP CALENDAR - REGION 1,2
//////////////////////////////////////////

region,1,2

offset,offset_-1,offset_-1
//cleararea,2,12,90,120

deactivatebuttons,2


image,2,0,calendar.png,t
button,2,0,20,17,1,4,2,1

image,100,0,filter.png

changefont,Tahoma,11
image,2,12,popup_calendar.png,t
calendarheader,2,24,12
calendar,0,0,2,36,12,12,,t
button,1,38,84,71,-1,5,0-highlight,2 // CALENDAR BUTTON
button,1,38,84,71,-1,25,0,2 // SET CURRENT POOM DATE TO CACHE 0
button,1,38,84,71,-1,23,0,2 // CLEAR OUTLOOK CACHE 0
//button,1,38,84,71,-1,23,1,2 // CLEAR OUTLOOK CACHE 1
//button,1,38,90,65,2,4,0,-1
button,1,38,84,71,1,4,1,-1
text,43,12,[caldate],0,c,"MMMMM yy"
image,5,14,arrow_left_small.png,t
button,5,14,8,8,5,9,0-highlight,-1
//button,5,14,8,8,2,4,1,-1
//button,10,14,8,8,-1,23,0,2
image,75,14,arrow_right_small.png,t
button,75,14,8,8,5,8,0-highlight,-1
//button,75,14,8,8,2,4,1,-1
//button,75,14,8,8,-1,23,0,2


if,region,2,1
image,180,0,taskbar agenda button.png,t
button,180,0,20,17,2,4,1,-1
button,180,0,20,17,-1,23,0,-1   //CLEAR OUTLOOK CACHE 0 = CALENDAR 0
else
image,180,0,taskbar agenda button_off.png,t
button,180,0,20,17,2,4,1,-1
button,180,0,20,17,-1,23,0,-1 //CLEAR OUTLOOK CACHE 0 = CALENDAR 0
endif

if,region,2,2
image,200,0,Taskbar task button.png,t
button,200,0,20,17,2,4,2,-1
//button,200,0,20,17,-1,23,1,-1 //CLEAR OUTLOOK CACHE 1 = TASK
else
image,200,0,Taskbar task button_off.png,t
button,200,0,20,17,2,4,2,-1
//button,200,0,20,17,-1,23,1,-1 //CLEAR OUTLOOK CACHE 1 = TASK
endif  

if,region,2,3
image,220,0,taskbar countdown button.png,t
button,220,0,20,17,2,4,3,-1
button,220,0,20,17,-1,23,0,-1   //CLEAR OUTLOOK CACHE 0 = CALENDAR 0
else
image,220,0,taskbar countdown button_off.png,t
button,220,0,20,17,2,4,3,-1
button,220,0,20,17,-1,23,0,-1   //CLEAR OUTLOOK CACHE 0 = CALENDAR 0
endif


offsetadd,0,21

endregion,1,2



I'm going to knock off for now. Maybe something will occur to me if I let it rest for a while  :D

uk_skinner

ya1950, I assumed your calendar is in region 1, right?  But based on the codes, you target region is 5 and update the whole page (-1).

Try to use

button,5,14,8,8,-1,9,0-highlight,1

replace your

button,5,14,8,8,5,9,0-highlight,-1

ya1950

Thanks for staying with this! Just reread your post. One correction. The correct code should be:

image,2,12,popup_calendar.png,t
calendarheader,2,24,12
calendar,0,0,2,36,12,12,,t
button,1,38,84,71,-1,5,0-highlight,2         // CALENDAR BUTTON
button,1,38,84,71,-1,25,0,2            // SET CURRENT POOM DATE TO CACHE 0
button,1,38,84,71,-1,23,0,2            // CLEAR OUTLOOK CACHE 0
//button,1,38,84,71,-1,23,1,2            // CLEAR OUTLOOK CACHE 1
//button,1,38,90,65,2,4,0,-1
button,1,38,84,71,1,4,1,-1
text,43,12,[caldate],0,c,"MMMMM yy"
image,5,14,arrow_left_small.png,t
button,5,14,8,8,5,9,0-highlight,1
//button,5,14,8,8,2,4,1,-1
//button,10,14,8,8,-1,23,0,2
image,75,14,arrow_right_small.png,t
button,75,14,8,8,5,8,0-highlight,1
//button,75,14,8,8,2,4,1,-1
//button,75,14,8,8,-1,23,0,2

Changes in bold.

The 5 is correct, it specifies that this is a calendar button. The 8 & 9 move the month forward and backward respectively.

As you say, I was updating the entire screen. By only updating region 1 it solves the problem of region 2 (agenda) redrawing itself over the calendar image. Thanks. :D

I was thinking of calling it Today's Breeze  :D

uk_skinner

Great!!!  Can not wait your skin... :dance:  :drool:  TPBreeze???