This is the second part of a two-part article. In the last article we learned
how to use the tag property to create our own microhelp and automate it. In
this article we are going to go one step further and use the tag property for
The list of items that I used the tag property for has shrunk over the years
as Sybase has tried to give us more tools. Apart from the microhelp the most
common use I had was to implement a tool tip. Now Sybase gives us a tool tip
without our having to code a pop-up window.
Luckily I don't have to have a long list of items; one more is sufficient to
show you the technique that I desire. I want to show you how to use the tag
property for more than one thing. We have the microhelp, how about something
else such as automatically bolding the static text that is associated with
What I mean is that we can set it up s... (more)
Have you ever seen a form that has its own microhelp that changes when a
field gets focus? I'm sure you have. You might see a window and at the bottom
of the window is a line that says, "OPTIONAL - Enter the employee birth
date," when a field is entered. We are going to create a simple automated
solution that will allow you to carry the microhelp along in the DataWindow.
Take a look at Figure 1. It's a freeform DataWindow with a SQL data source. I
chose the Employee table from the sample database that comes with
PowerBuilder. I didn't do anything special to it. My goal here is to ... (more)
This article describes how to create a grid presentation window that allows
sorting by clicking on the column header.
To begin we need to create a grid DataWindow. I'm selecting just a few
columns from the employee table. Here is my sql for the DataWindow in Figure
Once we have created it I get the DataWindow painter shown in Figure 2.
There are several changes that we need to make. Let's change the status
column so it's no longer a set of radio buttons. This is a read-only screen
so let's remove the status and add a computed field.
To do this let's remove the Status column ... (more)
In my last article we explored what I call Advanced DataWindow Sorting. We
covered everything that we need for the DataWindow. In this article we are
going to polish what we did last month and make it look professional.
The main area of concern is our sort selector window as seen in Figure 1. It
does the job. It's just amateurish and doesn't provide the full flexibility
that we really need.
You may recall that the text of the sortable column is specified in the tag
property of the column in the DataWindow. (huh?)
We open the sort selector window with a parameter, something like t... (more)
Have you ever used a datastore that ran without a problem while you were
developing your application, but once you've compiled it stopped running? Let
me tell you that's a difficult bug to fix.
I remember it so well. I kept going back and forth. How in the world could
the DataWindow work at design time yet not in the executable? I remember that
I checked the return value of the datastore. I finally noticed that the
datastore returned a -1. That's such a strange thing.
The datastore returns the number of rows that were returned or a -1. The help
files used to say that a -1 was in ... (more)