Thursday, April 15, 2010

Tips & Tricks # 3: Using SSCAL on a from and to period

Tips & Tricks # 3: Using SSCAL on a from and to period

Although you can see that other SS classes complements each other, right now I am focusing my Tips & Tricks on SSCAL, on how to maximize its possible usage. So now, this simple image shows you that it is likewise good to use it on a From and To period (SSDTPicker is also good for this).

After finishing my enhancements on Editing Module last night, I started enhancing the GUI of Consumption Monitoring Module as well where I replaced my SSDTPickers with SSCALs. Here is the former look using a hot-skinning approach (all SS objects use the same theme and color):

- click to see its real size -


And here now is when I decided to design using combinations of various themes and colors plus adding some SSConfiner objects:

- click to see its real size -


As you can see, the impact on appearance and it seems on its capability versus the old one is huge although both images performs just the same thing.

One problem I begin to have though is when I started designing using a combination of my classes, I can't seem to be satisfied with an output as every color and theme combination I use produces a beautiful appearance. Still, the above is what I have finally decided.

To give you further example about my indecision on what would be the final output, I cannot seem to decide whether to show the front cover first or the inner one. Here it is again if the inside is what is shown as default apperance:

- click to see its real size -


Both have huge impact on a slightly different scale and both looks beautiful. Well, I bet I can decide on any of these two.

One thing I can brag though, using my SS Classes will definitely produce a web-like appearances on your ordinary forms. And that is only the start. Although the possible appearances when using combinations of my existing themes seems to be endless, Wait till I find the time and decide to create more themes and effects; which definitely I will do. Cheers!

Tips & Tricks # 2: Binding 2 or more SSCALs

Yesterday I have shown that an SS Class like SSCAL is not just a mere display to enhance the GUI of your app. It can be used as well to perform other things such as harvesting transactions for the day by using its value via SQL SELECT. Today I will show how to bind, sort of, an SSCAL class to another SSCAL class; on the same form.

Last night, I decided to enhance my Editing Module as users here in PNG are very careless of things. Regardless of several instructions and tools, they stil are very lax in encoding. So I have added another feature, i.e., auto-detecting of several vouchers used on a single asset for a day.

Originally I played with hot-skinning approach. This time however, I wanted to see how SS Classes will work when different colors and themes are combined in a single form; on a real project. And since the new design I have in mind will have a huge empty space on the left, I decided to use two SSCALs; one showing the front cover and the other the inner side. These SSCALs should be binded, sort of, with each other meaning when user clicks on the inner calendar date then the one on the left showing the front will likewise change.
- click on the image to see its real size -
Is it hard? Definitely not! It is actually simple.

Also yesterday I have shown the use of DODEFAULT(), now I will be showing how NODEFAULT favors us. I won't bother showing the codes anymore on how I was able to work on the enhanced editing module. What we will focus is on NODEFAULT and how linking is done on the front cover of the 2nd instance of SSCAL.

Since now we wanted to make it appear that those two SSCAL are binded with each other, we would not want to activate the default action of double-clicking the inner calendar which is showing its front cover (default). So what do we do? Instruct SSCAL "not" to perform that "Default" actions inside the class, i.e., NODEFAULT. On OpgDay DblClick Event, simply issue:

NODEFAULT

And that is it. SSCAL's front cover won't appear anymore. How to link then to the cover of the other SSCAL? Remember these codes from Tips & Trick 1 OpgDay Click Event?

DODEFAULT()
thisform._gridrefresh()

thisform.grid1.AfterRowColChange()


In addition to that, all I need is to add this to the next line:

thisform.sscal2._settings("orange",this.Parent.Parent._value)

So what does that do? I am "injecting" a new value to SSCAL instance # 2, the value coming from SSCAL instance # 1. And that is it!

Now, how about disabling SSCAL's 2nd instance of showing the inner calendar when clicked? Well we can again do the NODEFAULT trick BUT... by trying to prevent unnecessary additional objects inside my classes, I intentionally did not create a shape over the front cover for receiving double-click event. Showing the inner calendar via double-click is distributed to these objects:

a. The front cover image
b. The Calendar Day label
c. The Calendar Day's Shadow label
d. The Clock label
e. The Month label

So, insted of putting NODEFAULT on ALL of abovementioned double-click events, it is simpler to do this trick. Place a transparent-bordeless shape above the calendar and that is it! No amount of double-clicking will work now. Cool?

Enjoy using SSCAL!

Wednesday, April 14, 2010

Tips & Trick on SS Classes

Tips & Tricks # 1: Using SSCAL on acquiring transactions for the day

- click on the image to see it in its real size -

When I first decided to create the Editing module, I decided to utilize my SSCAL in acquiring the transactions for that day. So user will simply click on the day shown on SSCAL or navigate to the appropriate one. To do that, I have to tap into the Opgday Object of my SSCAL, Click event and place these:

DODEFAULT()
thisform._gridrefresh()
thisform.grid1.AfterRowColChange()


We will break the above one by one.

As you can see, DODEFAULT() is necessary to instruct SSCAL to perform whatever it is assigned to do then do some more which is calling a method for grid refreshing and calling also the grid's AfterRowColChange event which is basically needed to update display of other objects.

What I am doing now is moving away from SAFE SELECT approach, not that it is not working properly but I am trying to avoid too much record movements between cursors. All we need to do, to avoid Grid Reconstruction is simply something like this:

Thisform._GridRefresh Method:

* Reset RecordSource first
Thisform.grid1.RecordSource =''


* Perform the necessary SQL Select command

Select vchrno, liter, mreading, Alltrim(assets.assetno)+'-'+Alltrim(assets.xdescript) As xasset, fuelpk From fuelvchr ;

LEFT Outer Join assets On fuelvchr.assetfk = assets.assetpk;

WHERE xdate == Thisform.sscal1._value Into Cursor junkgrid Readwrite


* Bind the grid to the cursor and refresh

Thisform.grid1.RecordSourceType= 1

Thisform.grid1.RecordSource = "junkgrid"

Thisform.grid1.Refresh


That is fast, compact and easier. Same result. What is more, it won't reconstruct a grid.



Thisform.Grid1.AfterRowColChange() Event:

I use this event instead of creating a separate method as we can also call this from anywhere inside the form. The result is basically the same. I am using this to update other objects such as textboxes, comboboxes, etc. Basically what it does is simply something like these:

Thisform.txtXdate.Value = fuelvchr.xdate
Thisform.txtVchrno.Value = fuelvchr.vchrno
Thisform.txtliter.Value = fuelvchr.liter
Thisform.txtMreading.Value = fuelvchr.mreading
Thisform.edtRemarks.Value = fuelvchr.remarks



... and some more...

And so what it does, basically, as I have said is showing the transactions keyed in for the day using SSCAL. Check again the image above so you can visualize how it is done.

That trick can be used both on the per subscription and free version. Hope this will be useful to you. Next Trick is utilizing two SSCALs at the same time. Enjoy!





SSConfiner Updates

I noticed that I failed to address one issue with SSConfiner in VFP9, i.e., Anchoring. Since I made my own computations inside, when a form is resized SSConfiner is resized albeit improperly. So now that I have the time every night to go through the classes one by one, I am making the necessary adjustments. Anchoring feature is now fixed.

Another issue, very discreet and cannot be easily noticed except by some who are very particular with details, is the shadow option. The shadow, when enabled, actually does not appear properly. The shadow appears properly on the right portion but the lower portion is hidden. Fixed that as well.

Look at the images below: normal size, dragged to the right and down, then dragged to the left and down. The middle has no Anchoring so it is not resizing. It is shown there for comparison purposes only; and also to show how an SSConfiner playing with various _settings may appear.


Cheers!

P.S. One mistake I made on the middle SSConfiner caption, inside color is not the default one. The default setting is no inside color. However, I already captured said image so I will just make this note.

Also as you have maybe noticed, I did not include any of my classes in the sample form. The topic is SSConfiner so it remains pure about it. However, just for fun, we will add SSTBnextGen and SSPage now; just to see the difference, LOL! Below SSTBNextGen is red using theme 4. SSPage tabs uses green color.

As usual, click on the images to see those in their actual sizes.

So how was it? Looks like web page objects eh?

Tuesday, April 13, 2010

SSCAL Updates/Enhancements

Onwards with the modifications, I have finished last night the changes I deemed necessary to satisfy my taste with SSCAL:

a. Reduced Image Size. Like the SSDTPicker, the calendar I created before is also huge against my taste now so I made it a little bit smaller:

Note: Click on the image to see its real size.


b. Better Colors. I remixed colors both in psd source images and inside VFP. Now take a look at the colors inside the calendar details. They are well blended. Although I have posted yesterday the SSDTPicker image, its inside colors are now also changed (I am feeling lazy in capturing the images again just to update the image sample I posted yersteday). So just be aware that the insides of SSDTPicker now are like these:

Note: Click on the image to see its real size.


c. Added a 3rd switch to show the inside calendar upon initial display instead of the front cover. By default front cover is what is shown. Placing a logical .T. on that 3rd parameter will instruct SSCAL to display the inside calendar upon initial display.

d. Added the ability to show/hide clock on the face. I don't believe that most of us needs that clock so I added a 4th switch for showing or hiding that. Default now is hidden.

e. Added Spinner Year.

f. Added Spinner Month.

g. Added Return to Current Date.

- Please check SSDTPicker Update I have posted yesterday for letters e, f, and g above -


As I have said, once I become free (just like now, a little bit free), I will continuously enhance these "pet" classes of mine and will update the subscribers. Right now, I haven't yet and they are still not aware of these enhancements since I am still thinking of some more to do; but soon they will simply receive emails from me of these updated ones.

Monday, April 12, 2010

SSDTPicker Enhancements

When I originally designed SSDTPicker 2, I thought it is beautiful. However, once I started using that on my end, I have seen that together with other objects (Native VFP and SSClasses alike), said SSDTPicker seems to be out of proportion. It is big and does not appeal to my taste of combination.

So last night, I started working on its new size and I further removed some effects inside the calendar because it seems it just adds confusion to the eyes. Here now is the new size and colors of SSDTPicker.

Click on the image below to see its actual size:


As you can see I added now a border which I don't know why I forgot to do last time. In addition, the 7th color of my ss themes plays between pink or violet. However, when used in my projects, neither of those colors appear to be working well for me so I changed it again into the last color above.

Other more added features (aside from undocumented enhancements I made on that one) are:

a. Spinner Year - I added this one because when using said class, I find it hard to navigate into a different year.

b. Spinner Month - to easily navigate between months. Loops from Jan to Dec.

c. Return to Current Date - this is an overlooked one. I thought I have made this last time but it seems I failed to put the necessary click event.














So there you are, the enhanced SSDTPicker with better and new features. Now I am off to modifying SSCal. It is likewise too big for my taste.

Tuesday, April 6, 2010

Theme 8



Yesterday, I created a new set of designs for SSButton and SSConfiner's use. It is theme 8:

In addition, I have made some more adjustments to ss classes, some of which includes allowing empty date value for SSDTPicker 1 & 2, Auto-Hiding of Popup Calendar when it looses focus, allowing the inner calendar for SSCal 1 & 2 to be shown first, and some more. I will update soon via email the subscribers.

I believe I will be creating some more new themes again later as I was able to purchase a new unit with 256MB Video Card, just this morning. Whereas before I made those themes in photoshop using my other unit with built-in video chip, now with this new unit creating new designs would not be that slow.

Cheers!


Thursday, April 1, 2010

Live Backup v2.1.4

Finally, I was able to finish most of the IT projects that are waiting for me. I said waiting because I came back to the Philippines after a 3-month period of working on the new company as an ICT Manager to wait for my working visa. So for the period September last year to February this year, I am just sitting most of the time in front of my computer in our house in the Philippines. That is when, having nothing much to do, I started my journey with RTF, Automation and my SS Classes.

But I'll be damned, when my working visa arrived where I was recalled immediately this February back to my work, I found out that my staff instead of working on the projects that are supposed to be done, have messed up the settings and restrictions I have left and plainly sits around waiting for me to come back.


Well, there is no use in grumbling and mumbling so I squared my shoulder and immediately set working to straighten things out and finish those multiple projects waiting for me. Lucky for me, I have my "Treeview Monitoring Tool" which is a big help for me. And finally I have seen a crack on my schedules, so I am back!!!!

But what is this new blog all about? This is just to promote my SS Classes I guess. I have made further
enhancements on those and since while working on multiple IT non-developing projects, I am also creating a small tool to help monitor assets and fuel consumptions of the company; then it came around that of course I needed a backup module. Naturally, I sought my Live Backup v2.1.3. However, since I am now using my SS Classes for enhancing the appearance of my new projects, said version no longer match my current project.

So this morning I started working on version 2.1.4 of that. This new version uses SS Classes and I will be damned if I haven't made it better than the last version especially in GUI. Of my 8 classes, only 5 are used here (SSTBNextGen, SSButton, SSConfiner, SSPage, and of course SSSupport which is a must):


NOTE: Click on an image then click again once to view it in its actual size


Folders To Backup Page
Files to Backup Page
Archive Destination Page
Backup Options Page

Have you noticed the page tabs? They are of different colors. SSPage have 7 colors so you can make the colors of each tabs different from the rest.


So there you are! A very nice new GUI in no time at all! That is what you will get when working with SS Classes, ease on designing with beautiful web-like interface. In addition, I made this version now .app instead of .exe so it can be easily called from inside any exe. Want to have the ability to create those cool looking interfaces? Simple, subscribe on my classes at ssclasses.jun@gmail.com.

P.S. Wait for a sample project with my SSClasses so you can personally see how it works.