PowerBuilder ‘Gotcha’ – Datawindow Column Alignments

Posted on Thursday, June 9th, 2011 at 8:20 pm in

I’ve been working quite a bit lately on the ‘tooltip’ type of functionality for datawindows. I encountered an issue today which gave me a bit of hassle until I worked it out. My technique looks at the width of the column and it’s position within the datawindow control to decide whether or not all the text is visible to the user. If the text is not visible I want a tooltip to display with the text so the user does not have to scroll or make the column larger.

When I am comparing the column and it’s contained string to the right or left of the datawindow controls size I also take into account whether or not the column is Aligned left or right. The issue is when dealing with a dropdowndatawindow I really need to look at the alignment of the column displayed from the dddw object, not the parent column. In my case, once I set the parent column to have the same alignment as the column from it’s associated dddw, my functionality worked as I expected.

You might also be interested in