Bug 1919

Treeview's (rightclick) behavior change after the upgrade 13 June, 2021

Ramendra Singh
26 November, 2018
Product: PowerBuilder Category: Controls & UI
Version: 2017 R3 Build:
Classification: Issue Publishing: Public
Priority: P2
Status: Closed Reason: NO RESPONSE
Ken Guo @Appeon 13 June, 2021
#14
Hi Ramendra,

Based on our policy we have made multiple attempts to contact you and determine if this ticket has been solved, unfortunately we did not get any response and we will now proceed to close it. 

If you consider this issue is still not resolved, please let us know and we can reopen this ticket.

Regards,
Ken
Ken Guo @Appeon 11 May, 2021
#13
Hi Ramendra,

I would like to check with you if the response provided has been helpful enough
to resolve your case. If so, can we proceed to close the ticket?
Otherwise, do let us know if we can provide you with any further assistance and
keep in mind that you are always welcome to open another ticket in case you
need it.

Regards,
Ken
Ken Guo @Appeon 17 March, 2021
#12
Hi Ramendra,

I would like to check with you if the response provided has been helpful enough
to resolve your case. If so, can we proceed to close the ticket?
Otherwise, do let us know if we can provide you with any further assistance and
keep in mind that you are always welcome to open another ticket in case you
need it.

Regards,
Ken
Ken Guo @Appeon 12 November, 2020
#11
Hi Ramendra,

I would like to check with you if the response provided has been helpful enough
to resolve your case. If so, can we proceed to close the ticket?
Otherwise, do let us know if we can provide you with any further assistance and
keep in mind that you are always welcome to open another ticket in case you
need it.

Regards,
Ken
Ken Guo @Appeon 28 November, 2018
#10
Hi Ramendra,

This TreeView behavior is different from PB 6.5 after PB 7.
I am sorry that we have no plan to change this behavior. 

Regards,
Ken
Ramendra Singh 28 November, 2018
#9
Hi Ken 

Thank you for the reply, the problem is I can't apply setfocus after loading the treeview.

If you compare, the rightclick behavior only works similar to click, doubleclick after the setfocus which is an additional step only for rightclick.

As per me, this is change in behavior and we should have rightclick behave similar to other events.

Regards
Ramendra
Ken Guo @Appeon 27 November, 2018
#8
Appeon Test Case

Hi Ramendra,

Please try the attached test case. 

Regards,
Ken
Ramendra Singh 26 November, 2018
#7
Hi Ken 

Thank you for the reply, I did tried this but it always keep the focus on the first item in the list and this created problem in our application.

I have attached the snippet code for your reference, please do the suggested change and you should able to verify the little difference as compared to 6.5.

Please let me know in case any further details needed.

Regards
Ramendra
Ken Guo @Appeon 26 November, 2018
#6
Hi Ramendra,

Sybase adjusted the rightclicked event for TreeView and ListView since PB 7. See the following link for details:
https://www.appeon.com/support/documents/appeon_online_help/pb2017/migrating_pb_apps/ch19s03.html

Therefore, we suggest you do the following:
After the data is retrieved in a TreeView, you can do a treeview.Setfocus().
In the treeview rightclicked() event, add treeview.SelectItem (handle).

Regards,
Ken
Ramendra Singh 26 November, 2018
#5
Thank you Chris for your prompt response (as always) :)
Chris Pollach @Appeon 26 November, 2018
#4
PS: I tested this on W10 BTW.
Chris Pollach @Appeon 26 November, 2018
#3
Hi Ramendra;

   Yes, I get the same weird behaviour as well when using the RHMB. I will transfer this ticket over to Appeon Support for their recommendation(s) to Engineering for a fix. 

Regards ... Chris
Ramendra Singh 26 November, 2018
#2
PB6.5 code was connected with Peat database
PB 2017 R3 code was connected with poc.mdb which is attached.
Ramendra Singh 26 November, 2018
#1
SourceCode.zip (77KB)

*Phenomenon:

We recently did the migration from PB6.5 to PB2017 R3 and there is one issue that I noticed with the Treeview control is in the SelectionChanged() event.

After the population of data and doing the rightclick  on any new item (e.g. 13th item from the list)
With PB6.5, I am getting oldhandle = 0  and newhandle =  13
With PB2017 R3, I am getting oldhandle =  0 and newhandle = 1

I have also create a snippet tool on both versions and can see that RightClick is behaving differently.

*Reproduce Steps:

Run the program
Click on Command Button to retrieve the items in treeview
RightClick on the any item (except the 1st)

Current Outcome: 

The newhandle from selectionchanged event return the first item number.

Expected Outcome:

The newhandle from selectionchanged event should return the item number of the item clicked.


Remark:

Note: There is no code written in RightClick.
OS:
Windows 7
Platform:
32-bit
Database Type:
SAP ASE
Database Version:
16.0