1. James Medick
  2. PowerBuilder
  3. Saturday, 1 October 2022 16:40 PM UTC

Why does the Modify statement remove formatting for a column?

This.Modify("column_name.Visible = No")

Hides the column (ddlb), but "Visible = Yes" displays only the value without the list box.  Same problem with Radio Buttons and Calendars.

John Fauss Accepted Answer Pending Moderation
  1. Sunday, 2 October 2022 16:48 PM UTC
  2. PowerBuilder
  3. # 1

Two suggestions:

1. Try disabling the use of themes to see if this is a factor.

2. Instead of setting the Visible property to "Yes" or "No", set it to 1 for yes or 0 for no. Ex: dw_1.Modify("columnname.Visible=0") This is the way PB Help shows to change the Visible property for a Column DWObject.

Without using themes and performing the Modify using 1/0, I've verified that this issue does not occur in PB2019 R3 Build 2670, PB2021 R1 Build 1509, and PB2022 R1 Build 1516.

Best regards, John

Comment
  1. Andreas Mykonios
  2. Monday, 3 October 2022 10:19 AM UTC
Hi John. I guess you wanted to mention PB 2022 Build 1716 and not 1516... But still this is the beta version. The GA is 1878.

Andreas.
  1. Helpful
  1. John Fauss
  2. Monday, 3 October 2022 13:14 PM UTC
Hi, Andreas! Yes, you are correct. I have not yet replaced the 2022 Beta on my home system. Thanks for the catch!
  1. Helpful
There are no comments made yet.
James Medick Accepted Answer Pending Moderation
  1. Sunday, 2 October 2022 16:37 PM UTC
  2. PowerBuilder
  3. # 2

Two things discovered:

(1) Setting the Theme in the application Open statement, ApplyTheme("C:\Program Files (x86)\Appeon\PowerBuilder 19.0\IDE\theme\Flat Design Grey"), causes all of my radio buttons to lose their border format.

(2) When using the Modify statement to set Visible = No, or Yes, removes all the formatting from the affected columns, (i.e., ddlb displays data only as ddlb is removed, same with radio buttons and calendar).  This does not happen when using Dot notation (thanks so much for the suggestion).

I was running PB 2021 when this occurred but upgraded this morning to 2022.  Same result in each version.

There is one other condition I should mention.  I have never been able to access the PB Tables for the data windows.  When I first connect, I get a message saying they are unavailable or cannot be reached.  I just ignore this and don't use them.

Thanks for the quick response.

J

Comment
  1. Andreas Mykonios
  2. Monday, 3 October 2022 10:17 AM UTC
Hi.

For the pb tables issue you mentioned, can you let us kwon the database you are using?

Andreas.
  1. Helpful
  1. James Medick
  2. Monday, 3 October 2022 13:26 PM UTC
It is MySQL 5.X. Connection through ODBC is fine but I have no access to the PB tables.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Saturday, 1 October 2022 17:28 PM UTC
  2. PowerBuilder
  3. # 3

Hi James;

   That would certainly be a bug. If you are using a supported Appeon PB version & can create a small test case app that replicates this problem, then please open a Support Ticket (provide O/S & hardware details as well please). Thanks!

Regards ... Chris 

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Saturday, 1 October 2022 17:20 PM UTC
  2. PowerBuilder
  3. # 4

Version, Release, Build #'s?

Have you tried same using dot-notation to see if there is any difference?

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.