Monday, December 11, 2017

dtPickerX - December 2017 version

Okay, so I changed some things (again) inside, for the better.  And aside from listing what those are here, I decided to make this post as the official guide post for dtPickerX class too.  So what are these enhancements and what are the previous features which I may have not highlighted before?


1. Better Year Spinner.  I have improved SpinnerX class so I can use it here and this, IMHO, gives a better look and faster reaction than the native Spinner object I have used on the earlier versions of this class.

2. Better Time Picker.  I modified ScrollTime class too to give it a better look and new attitude too, then used that for the time picking section here instead of the previous DropTime class.

3. Dates Color Explosion.  I added back the capability to put notes and holidays found in one older version, but this time in a much easier fashion plus with more color markings to choose from (7 colors, the 8th box is for HotKey Tooltip).  Also now, the initial set of holidays are all set to blue color (first color).  Nevertheless, users can choose to use any of the colors later for that but it would be better to leave the blue for holidays.

Why different colors?  Well, you may wish to use the colors to indicate the urgency of a note.  Say for those you need to remember such as birthdays of your loved ones, then you can set those to a strong color like pink.  So immediately when you see a date that is encased in a pink box, you know that that is a birthday occassion.  Or for your wedding anniversary, you may want to set that to red as when you forgot such occassion, you are definitely in trouble.

Wednesday, November 8, 2017

SwitchX/OptionSwitchX Bold New Themes

Since I adjusted the library to make it more flexible, I decided to replace some themes with bolder new look to spice up further our app.  And here are the latest themes for both classes

This and other more classes are part of ssUltimate Library.  Cheers!

Thursday, September 14, 2017

xBox via SQL Pass-Through and Stored Procedures

Since xBox was created while I am still working with pure VFP, the approach I did was designed to work only on VFP's native backend.  So to have something like this:

You have to put in its InteractiveChange Event codes like this:

Local lcSQL
Select vesselname,vesselid from Vessels
      where [MySearch] $ vesselname 
      order By
      into Cursor curVessel NOFILTER

Where [MySearch] will be automatically replaced by xBox class with whatever you have already typed.  And curvessel.VesselName is the value it will return, the one that will be held by its .Value property.  There is secondary value it can return after that via .ExtraValue property but that is another topic.  If you are already a subscriber or user of ssUltimate's xBox, then you already know about this.

Lately, I decided to use MariaDB and so to make xBox working there, I showed the way here:

But that requires two jumps as follows:

* Get data from MariaDB/MySQL
SQLExec(gomyapp.dbHandle,'Select vesselname,vesselid from Vessels order by vesselname','vessels')
* Use generated cursor on the class
Local lcSQL
Select vesselname,vesselid from Vessels
      where [MySearch] $ vesselname 
      order By
      into Cursor curVessel NOFILTER

Or you can reverse the process limiting the number of records of the  cursor generated from the other backend using WHERE clause on the SPT query instead of the one needed by xBox class.  

Today, I added two new direct calls to the other backend which will not require a 2nd jump anymore.  Two new class methods, 1st is for SQL Pass-Through query approach and another for Stored Procedure approach.  Let us see how the call is made on those two:

via _SPT() Method.  This expects parameters as follows:
Lparameters ndbHandle, cSQL, cCursor, vValue, vExtraValue

Tuesday, September 12, 2017

CtrlBox New Features

Brief History

Originally CtrlBox is intended solely as a slave of my TitleBarX class when I decided to experiment with shapes for the controls there (minimize, maximize/restore, and close).  Later I decided to create it as a master of its own (while still being used by TitleBarX).  So now, it can be dragged and dropped onto a form and that will replace your form's native titlebar.

New Features

  1. Now it auto hides the form's native titlebar
  2. Now it auto repositions itself onto top-right corner
  3. New built-in titlebar of its own.  I added this today as sometimes I wanted to make the form movable but still using this class.  For this new titlebar to appear, you have to set _WithBar = .T. (default is .F. or no titlebar).  This is affected further by the following:
    • Caption - the caption to be shown on the titlebar

Properties affecting Caption follow:

  • FontName = default is Calibri
  • FontSize = default is 12
  • FontBold = default is .T.
  • ForeColor = default is RGB(255,255,255)
  • Alignment = default is 2 (center).  I know some of you will love to have a caption in the middle
  • BarHeight = Default is 20.  The height of the titlebar. This also affects the caption height 

Friday, September 8, 2017

SpinnerX (New), FaderX (Enhancement) & Others

I was creating this before but got busy with simultaneous projects.  But since I wanted to give some more feature for FaderX as I need it, then I decided to utilize this now instead of VFP's Native Spinner object. Right now this SpinnerX is very young that it has not much features yet but enough to be used as replacement for VFP Native Spinner class if you want something unique.  Its current properties follow:

- Appearance - Right now it has 3 different look as shown below:

- Value = Is the initial value fo the spinner
- ValueLow = Is the lowest value it can accept
- ValueHigh = Is the highest value it can accept
- Interval = Is the value to increase up or down

As with the native spinners, you can hover your mouse on it and use the mouse scroll to scroll up or down, or click on the buttons, or enter on the textbox.

Tuesday, June 27, 2017

DropTime Class

June 30, 2017

When Fast is still not fast enough....

I was supposed to update my subscribers this week but then I am thinking DropTime class is still not fast enough.  I need to make it faster.  And so I discarded the original concept of the class and turned this into a real time picker where user can also type if they want.  So this is how it looks now:

This class now also respects SET HOUR and will adjust display based on that.  What is more, the dropdown section now includes both hours and minutes into one so it involves only three (3) clicks now, first on the dropdown icon, 2nd on the hour and 3rd on the minute (that is if you don't want to type straight into the textbox for it):

And again on dtPicker nLevel = 3

Well that is it for now!  Next update will give it the capability to be used inside a grid.  Cheers!


Over the years, I tried to find ways to speed up and provide a unique time picker for my users and subscribers.  And I ended up working on different classes for this need:

DropClock - is a time picker based on combobox.  It has Interval property (default is 1) that allows faster picking of the hour and minute portion.   If interval is say set to 5, then the values shown will be with interval of 5, i.e., 5,10,15,20.... But it still is not fast enough because user still has to scroll down on the combobox especially if Interval is on default 1.

Then I created ScrollTime class which is like on Android.  It works with mouse scroll where you position your mouse pointer above the hour and scroll up and down.  The same on minute.  But it still is not fast enough too, plus it eats space on form.

Finally I created TimerX which is what I used in dtPickerX class for its time needs.  This is based on spinners so user can either type or spin the values.  But then it still is not fast enough.

I need something that will really make my users and subscribers' lives easier.

Finally I thought of a new idea this morning and I started working on it.  And behold my latest class, DropTime class.

Monday, June 19, 2017

NavigatorX class

Updates June 21, 2017

Added Options button (red gear on the image below)

Default value is shown.  You can turn it off via setting NoOption property to .T. and this button will be hidden.  Useful in some cases where we want to restrict users to specific things only.  This Option button (right now) gives users on-the-ply capabilities to do any of these:

  • Change Interval - by default, the interval of skipping a record is one (1).  It can be set on the PEM, Others tab into greater number but then you will be stuck up on that fixed interval.  So I decided to give users the capability to change skipping of number of records at their whim, and so this.
  • Jump To Record - is requested by a subscriber after I updated them yesterday.  This allows you to specify the record number to jump stright into that.
  • Set Filter (available only when bound to Grid) - allows you to filter grid records on-the-ply. 
  • Remove Filter (available only when bound to Grid) - as the name implies, remove the filter that you set above.
After posting this, I continued on testing the class and I made further changes to the Filtering Capability as follows:

It now forces you to click on a target column first before it allows filtering. If you haven't, it will give you the message 'Click on a Column First' which cannot be selected too.

That is because it has to know on which column of the grid it should perform the filtering.  After clicking on a header, then that is the time it will show the filtering capability and mentioning as well the target field like this:

In the above image, I clicked on the header of column for Company.  Please note that when it says Set Filter to Company, that company there is the underlying field used by that column and not the column header's caption.  That allows the users to realize too where they are performing the filter.

However, I remember that not in all cases, a filtering feature is good because there might be cases where there is already a filtering implemented in a grid and if we use this class filtering capability, then it can overwrite the filter condition which you guys set by codes.  And so for cases like that, I added the NoFilter property.  Set this to .T.  and it will not show that filtering capability anymore.

Miscellaneous Effects

Miscellaneous effects for GUI can be done via playing with these properties:

1.  BackColor, BackStyle, SpecialEffect, BorderColor, and BorderWidth.

2. Hover Effect.  Cousin Glen suggested an idea to show the border of the class on Mouse Enter.  I like it so I added it here as well.  To make the effect look better (at least to my taste), I changed SpecialEffect to zero as default.  So now when you move your mouse on top of the class, it is suddenly raised and when you move away from it, it goes back flat and borderless.

Some more ideas may come to me in the future about this class or some may be suggested by others.  We will see.

NavigatorX is a new control class that handles record navigation like going to top, previous record, next record, and going to last record or bottom.  I was browsing for some things on the web when I saw again a Paginator (Page 4 of 24) and I said to myself, well this looks cool to be added to ssUltimate Library?  But since we are not dealing with pages inside VFP as we have grid, then it is best known to us as a navigator.