The treeview control has a very neat piece of functionality built in called Tooltips. When this property is checked your application will automatically display all the text on a treeview item if it is cut off by the edge of the control when the mouse pointer goes over that row. If the row text is…
You are currently browsing the PowerBuilder category
PowerBuilder – Treeview like Tooltips for Datawindows
PowerBuilder – Datawindow column Edit.Style values
checkbox dddw ddlb edit editmask inkedit radiobuttons richtext For some reason I couldn’t find this information in a nice list so here it is.
PowerBuilder – Filter vs Find performance
If you have rows in a datawindow/datastore and you want to look through them for a match against some new code (say you are looking for an existing entry so you can add to the quantity), it is better to use the Find method in a loop than to use the Filter method. Filtering large…
PowerBuilder ‘Gotcha’ – Removing Blank Rows from Datawindow
I’m working with a ‘pre-Cambrian’ framework of sorts which has a datawindow ancestor with quite a lot of functionality in it. One standard piece in list type datawindows is to insert a blank row when the user opens a window. This way the user doesn’t have to click a ‘new’ button or do something else…
PowerBuilder – Application path
So you need to check some file you have deployed with your application and you have chosen to put it in the same folder as the executable. Sure, I’ll just check the current folder when the application launches and I’ll have what I need. Wrong. Since an application can be launched with a ‘Start In’…
PowerBuilder – Accessing C# Classes via COM to Capture a Screenshot
I was working with setting up screen capture functionality from within a PB11.5 application recently and came up against a wall which forced me to rethink my strategy. Initially I was using External Functions to the Windows gdi32.dll but had issues with my code causing it to ‘stop working’ after a few files were written.…
PowerBuilder – Setting column value without looping through all rows.
A question came up on the TekTips website about setting a column in all the rows in a datawindow to the same value without looping through. In this case the writer was loading data from over one hundred Excel files and wanted to track the filename of where the data came from. At first I…
PowerBuilder ‘Gotcha’ – SQLServer OLE DB and Identity columns
So I get a new machine at work and I’m busy loading all my development tools on it as well as changing settings and all such stuff. SQL Server and PowerBuilder get installed and upgraded, connected to Source Control, and I run the application from within the IDE. Things are fine until I insert a…
PowerBuilder – Development vs. Production Mode
You can set up a variety of helpful methods for use while developing an application which you don’t want users to get their hands on when in production. One example of this is my Window Information Service . To make this only available when running from the Powerbuilder IDE use the following steps. Set up…
PowerBuilder – PFC String service extension
Here is a simple modification to the PFC string service (n_cst_string) which will parse out an array of any datatype and returned a delimited string of the contents. The new method is a polymorph of the existing of_arraytostring. public function long of_arraytostring (any aa_array[], string as_delimiter, ref string as_string) // convert array to string array…