Let's suppose that you have a search window where a user can enter a search
string and get the list of text items matching this pattern. Ideally, the
portions of text that meet the search criteria should be highlighted, for
example, by text formatting. It could look like Figure 1.
In PowerBuilder we have a great tool for searching and displaying information
- the DataWindow. But how can we do text formatting inside a DataWindow
column? Unfortunately, there's no way in the DataWindow object to do that.
This article describes a technique that will let you simulate this.
A Sample DataWindow
To explain, let's say that we have a tabular DataWindow with a one-string
column called text. We'll only discuss selecting matching text patterns, not
filtering data, so our sample DataWindow can have an external data source.
The result set description for this DataWindow is very simp... (more)
PowerBuilder has a very handy way to make data entry more convenient: the
DropDownDataWindow and DropDownListBox edit styles for DataWindow columns.
Indeed, it's much simpler to pick up a value from a look-up list than to type
it in each time you need to enter it. However, it looks like we've overlooked
one of the cases when use of a drop-down list can make data entry easier for
Most of the time we use drop-down lists when working with lists of pairs
"encoded value"/"decoded value": the users see and select decoded values and
encoded values are saved in the database. T... (more)
It may seem as if PowerBuilder programmers are bound to use global variables.
Even the PFC, which is said to be the most successfully designed
object-oriented framework, requires the use of global variables. Is it
something in the nature of PowerBuilder that makes us use them? I won't
discuss whether it's good or bad to use global variables as enough has been
said on this subject. However, I am going to discuss why global variables are
usually used in PowerBuilder applications and how we can live without them.
When Global Variables Are Used
Let's face it, if you use global variabl... (more)
PowerBuilder Developer's Journal
A picture is worth a thousand words. We all have heard this saying a
countless number of times. But what if you don't understand what is drawn in
the picture? I was approached once with a request to review requirements
specifications for some module. The document contained a scheme that
represented the place of the module within the system. The picture was mainly
made of rectangles and arrows. The rectangles had labels and I figured out
that they represented other modules in the system. But I couldn't understand
the meaning of the arrows. When I ... (more)
PowerBuilder has very good online help and documentation that extensively
covers most aspects of programming with PowerBuilder. However, from time to
time you'll come across a problem that you can't find an answer to in the
online help or documentation. If a search on the Internet does not yield any
results either, the only remaining option is to try to find the answer on
your own. In this article I describe a problem I had with the dbName
DataWindow column property and what I found out about it.
How It All Started
I was maintaining a project that had had no activity for quite a f... (more)