Monday, January 16, 2017

GrdSortLock

Also a replacement for both GridSort and GridLock classes.  This one combines both classes' capability into one. Like AnchorX, codes here are more simplified and straightforward.  

What it can do?

Provide instant sorting capability on your cursor used as grid's recordsource.  To use this class is as simple as dropping this class on form and declaring on target grid's INIT:


thisform.grdSortlock1._BindGrid(this)
By default, grid's column 1 will be sorted ASCENDING. Left-clicking on other column headers will make that column the sorted one as long as the underlying ControlSource for that column is not of Blog, General or Memo type. Right-clicking a column header pops up options as shown below. So as the name says, it can sort and it can lock a column; or totally remove lock.



I urge my subsribers to likewise move into this later so I can also remove GridSort and GridLock (and again AnchorSizer) in the future from the library.

Saturday, January 14, 2017

AnchorX

I decided to revisit my AnchorSizer class because basically I just dragged the old ssAnchorSizer from ssClasses then dropped it to my ssUltimate library, and simply renamed it (as well as GridSort and GridLock).  My focus back then is on other new classes I was planning to make for ssUltimate and so I simply moved those ones there.

Today though, I decided to revisit my codes there... and I winced, LOL!  And shuddered too, which is what we normally experience for the sheer horror of seeing our old codes after learning better ones.  Anyway, I cannot simply remove that AnchorSizer anymore as others may be using those already plus while I do not like (now) the codes I used there and the way I manipulate resizing, those nevertheless work good on the resizing need.

So instead I created a new and better Sizer class for the insides of listbox, combobox and grid and named it simply as AnchorX.  So what has been changed here?

Saturday, January 7, 2017

DTPeriod Class

This is two dtPickerX class for our two dates need (from and to).  This is quite simple.  Drop this class on your form and choose its orientation, 1 for portrait (default) and 2 for landscape.

Why not logical?  Instead of 1 for portrait, why not use .T. and .F. for landscape?  Well I plan to create a 3rd look for this later when I got time.

This returns two (2) values, i.e., ValueFrom and ValueTo which are already self-explanatory.  Since dtPickerX now has that HotKey, then this one has that too.  It automatically switch values ensuring that ValueFrom will always have the lowest or equal value than ValueTo, removing your need to code those yourself.

On form, during developing, you will only see one (1) dtPicker.  But on runtime, it will be shown like any of these depending on your orientation.



And Oh, you can assign initial values on those too:

* DtPeriod Init
this.valuefrom = DATE(2013,2,12)

DODEFAULT()


Date Scoping

Min and Max Values.  Two properties I added just now are ValueMin and ValueMax.  Those are optional.  If you leave both empty, then there is no scope restriction.  If you set just the ValueMin to say DATE(2013,1,1) or Date()-90 or GoMonth(date(),-3), then the dtpickers can not go lower than that.  If you also set ValueMax to a date, then the pickers will be restricted to those scope.

As usual, I am open to suggestions and comments for the betterment of the library from existing subscribers or even from those who plan to subscribe but is wishing some features I have not created yet.

Cheers!

See what's on ssUltimate:

http://sandstorm36.blogspot.com/2015/12/whats-on-ssultimate-library.html