DatePicker Widget

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

DatePicker Widget

Geoff Canyon via use-livecode
Q for Hermann (or anyone else who knows :-)


I'm trying to use the popup version of the widget, simply by doing


*on*mouseup*
   popup*widget"community.livecode.hermann.datepicker"at100,100*
   put*it &CRaftermsg*
end*mouseup


but the datepicker window is far too small - only about 1/4 the size it
would need to be to show the whole datepicker, the rest of it is simply
cut off.

Is there something I need to do to set the window size I want ?

v108 of datepicker, MacOS, LC 9.0.0

Thanks,

Alex,

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: DatePicker Widget

Geoff Canyon via use-livecode
Alex,

the date picker needs for self-sizing at least "selectedDate"
in its property array. So this is minimal and works:

on mouseUp
   put "" into tP["selectedDate"] -- yields "today"
   popup widget "community.livecode.hermann.datepicker" \
      at 100,100 with properties tP
   if it is not empty then
      put it & CR after msg
   end if
end mouseUp

See the script of btn "POPUP" of the datePicker sample stack
for all options.

This is because sizing the widget requires script access which
is not allowed in OnCreate.
[You can also adjust width and height, use
  put "220" into tP["height"]
  put "220" into tP["width"]
but better use for that property pickerScale.]

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode