Thursday, January 7, 2016

CalendarX

February 8 Update:

  • Introduced Localization via .Language property (0=Indonesian, 1=English, 2=Italian, 3=Spanish, 4=Turkish, 5=Romanian).  For other subscribers who hasn't submitted me yet the equivalent of days and months on their local language, please submit to me.  I also need the local word for "Today".



  • Fixed bug on improper end of month that happens when we click on the month picker.

====

This is based on my DTPickerX's idea of a faster date navigation/selection.  Have 3 return values:

.Value = date value
._bom = Beginning of Month
._eom = End of Month

Use Click event to perform other things as we change/select dates.  Here is how some classes of ssUltimate library looks on form.


Wednesday, January 6, 2016

Popup Calculator

I was popped yesterday by a fellow developer who showed me his form using ssDropCalc saying he is very satisfied with ssClasses library.  Thinking that others are really using said class, I decided to create a counterpart of that today for ssUltimate.  Of course, it has to be better.

What is PopCalc?

This is the counterpart of ssDropCalc of ssClasses but is better in many ways


  • Better Look
  • Unlike ssDropCalc which is a container class, this one is a control class
  • This one does not switch between formula and values.  The formula is simply shown on the popup calculator but it always returns the value
  • Better hotkeys (hover the mouse to see)
  • Highlights the keys pressed (if you do not want to use mouse)
  • Easier to use


Using on Form

Drop it and resize if you want.  On focus, this auto-pops the popup calculator and with starting value of what you put there (default is zero unless you change it via code, e.g., this.value = 123)




To exit the popup portion, either click outside, press Esc or press Enter (hotkey to pressing = sign) on your keyboard. To forcefully pop it up again if you want, press down arrow or Ctrl+Down Arrow keys.

Using on Grid

This is easier than ssDropCalc in that all you need to do is drop it down to a selected column of numeric value.  It will then take ownership of that column without setting anything further by doing the following:


  • Inheriting ControlSource
  • Inheriting Font Name and Size
  • Inheriting Alignment
  • Making itself the CurrentControl
  • Setting Column's Sparse = .F.



When used on Grid, the popup calculator won't auto-pop (by design).  The shortcut to pop it up is Ctrl+Down Arrow Keys.

There you are, the latest addition to ssUltimate!  The only thing I am not that satisfied is because I used here ButtonX class for better look, then there is a bit (nanosecond) delay in popping up form as it has to redraw those buttons on loading of popup calculator.  But I still prefer it than creating several images for those buttons.


Added January 7, 2016

Added/Utilized these properties:

Classic Property - Whether to use native commandbuttons (default or .T.) or ButtonX (.F.).  While buttonx looks cooler, there is that nanosecond delay that some of you may not like, thus this option.

Themes - Affects only Classic popup calculator, whether Themese are used or not on those native commandbuttons

SpecialEffect - Affects only Classic popup calculator.   Using the control class' SpecialEffect property so I won't need to add another myself, ignore what is shows:

Control Class                  Effect on Classic Popup
0 = Raised                     0 = 3D (Default)
1 = Sunken                     1 = Plain
2 = Flat                       2 = HotTracking