1. Miguel Leeuwe
  2. PowerBuilder
  3. Wednesday, 7 April 2021 00:33 AM UTC

Hi,

I was having a look at the MR for pb2017 R3 (build 1951). I wanted to know which bugs had been fixed and if it's really needed to install, since we're about to release to a customer.

I looked in particular at this  bug: https://www.appeon.com/standardsupport/search/view?id=1058

Indeed, was able to reproduce the bug in pb12.6 (already upgraded 2017 with the MR). In pb 2017 it indeed seems to have been solved with the MR.
While testing this I found some strange behaviour of tab controls though:
- Looking at the pb help on tab controls and its the clicked() event, the help seems wrong at first, as it speaks of "tab pages", but when reading on, it became "kind of" clear to me: the clicked event of the tab control, is "somehow" propagated to the tab pages when you click on the label of a tabpage (or viceversa?). BUT ...

I found out that the clicked of the TAB is NOT executed if there is a MessageBox() in the selectionchanging or selectionchanged event. Even using POST for the messagebox doesn't make a difference: the clicked of the TAB is not fired.

This happens with PB12.6, 2017 and 2019.

Can anyone explain this to me? It's not very important, but the tab controls seem pretty weird to me and I'd like to understand them better.

I've attached a zip with a pb2019 version of the sample provided in the link to ticked 1058 (see above). If you want a version for 2017 or 12.6. The OP (Jason Howat) of the ticket posted a sample for 2017 and Marco Meoni made a similar one for 12.6.

regards

 

Attachments (1)
Accepted Answer
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Wednesday, 7 April 2021 00:42 AM UTC
  2. PowerBuilder
  3. # Permalink

Hmmm ..

I think I'm on my way of understanding this:

The pb help states that the 'clicked' event of the TAB control is triggered when letting go of the left mouse button. So the clicked is really similar to a left mouse button up event.

However, the selectionchanging and -changed events are triggered when clicking down the left mouse button, you don't even have to release the clicked button for these two events to be triggered. (I guess they have to, since the selectionChanging event has to be fired before the selection really has changed and give you a means to prevent the selectionChanged by returning a value of 1.

Seems a tiny little bit of a design flaw to me, but I couldn't do it better myself and hey.... I don't use the clicked anyway (I hope ...).

goodnight!

MiguelL

 

Comment
There are no comments made yet.


There are replies in this question but you are not allowed to view the replies from this question.