1. Tom Peters
  2. PowerBuilder
  3. Monday, 18 September 2023 16:53 PM UTC

Good Day!

We are evaluating a UX redesign in our PB applications. There is a Form control type offered by Oracle APEX which we think would be well-received by our clients: Floating Labels.

 

Figure 1 - Empty Field shows field name

 

Figure 2 - Field name renames after user enters data.

 

Are there any plans to add this type of control style to PB?The only way I can see doing that in DataWindows is to have transparent fields with text fields appearing/moving based on field text values. 

Thanks,

Sivaprakash BKR Accepted Answer Pending Moderation
  1. Tuesday, 19 September 2023 06:39 AM UTC
  2. PowerBuilder
  3. # 1

Hello,

Have you checked 

PB Toolbox – The most powerful toolbox for Powerbuilder (home.blog) ?

They have it as Material Design.   

HTH

Happiness Always
BKR Sivaprakash

 

Comment
  1. Arnd Schmidt
  2. Tuesday, 19 September 2023 13:30 PM UTC
Nice marketing :-)

I wonder why the author wants to remain anonymous.



Instead of using this component you can also think about using the Edge Control... and then someone may ask you: Why do you use PowerBuilder?!

  1. Helpful
  1. Sivaprakash BKR
  2. Tuesday, 19 September 2023 14:03 PM UTC
Arnd,

If you refer me here,

I want to say that I'm in no way connected to PB Toolbox or its company or its associate company or in anyway. I don't know why you came to the conclusion that it's a marketing one..

In many a place earlier, I've given link of few such 3rd party products for users. And many have given, IMO.

Hope you understand.

Thanks.
  1. Helpful
  1. Arnd Schmidt
  2. Tuesday, 19 September 2023 15:01 PM UTC
OK, I understand.
  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Tuesday, 19 September 2023 01:33 AM UTC
  2. PowerBuilder
  3. # 2

I presume the desire is to emulate a web page/app interface.

While it is possible to come close to approximating this feature, the development effort it takes to create it and the complexity of making trivial changes makes it unworkable, in my opinion.

Here's an example freeform DataWindow I threw together this evening. The single column's name is "userinput":

When I click in the first row and supply some data:

No "floating text" appears (yet), because the DW's Edit Control still has input focus and the data has not been placed into the primary buffer.

When I tab out to the next row:

Now the data has been placed into row 1.

In order to make this example appear similar to the examples in the APEX examples (I found the same URL that Arnd found), I had to set up the following:

  1. Create a column DWObject with transparent background and no border.
  2. Simulate the box border with four lines. This is necessary because a rectangle DWObject does not support transparent background. Because PB always places the text/data vertically near the top border of the column, the PB-supplied box border is not workable.
  3. Create a static text DWObject for the placeholder text, with transparent background, no border and dark grey text.
  4. Move the placeholder text DWObject to the back of the drawing order.
  5. Supply an expression for the Visible property of the placeholder text DWObject that hides it when the column contains data.
  6. Create a static text DWObject for the floating text, reduced point size, no border and transparent background.
  7. Move the floating text DWObject to the back of the drawing order
  8. Supply an expression for the Visible property of the floating text DWObject that shows it when the column contains data.

So, yes, technically possible, but I would lead a developer coup against management if I was tasked with implementing this in an actual, real-life application.

<soapbox> Some years back, I was excited when I heard Appeon was going to support window controls that had an updated look-and-feel. When this was actually implemented as Themes, I was immensely disappointed for a variety of reasons I won't go into here. I would still love to see new controls that have a modern user interface AND support themes, so that it would be possible to update an application's user interface without having to accept the loss of interface flexibility that comes with themes. As a lifelong resident of Real-ville, I'm not holding out any hope that I'll see it come to pass. </soapbox>

 

Comment
  1. Arnd Schmidt
  2. Tuesday, 19 September 2023 13:37 PM UTC
Repeat step 1 - 8 for the other 24 Columns on your datawindow. lol.

It would be interesting to see how to implement this dynamically.

With tags or even rectangles to have a simple function that is doing step 1 - 8 on the fly.

For sure ... the rectangle can then be destroyed.

I bet an experienced PB Dev can implement this in two long nights.
  1. Helpful
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Monday, 18 September 2023 18:40 PM UTC
  2. PowerBuilder
  3. # 3

are you talking about the placeholder that is available for single line edits?  show a placeholder value in an editable field?

 

you can do that in a datawindow using format.

 

use ; for different formats based on the values. 

for a number, the 4th value is for null. 

for example: 

[general];[general];[general];*** missing ***

 

will display *** missing *** if the value is missing.  if the value exists, it will display the value.

 

there is no way to display the field name without typing it in.  You may need to escape characters that are formats (# for example) if you want the character to display and not show the format.  backslash is the escape.

 

 

 

 

Comment
  1. Arnd Schmidt
  2. Monday, 18 September 2023 23:03 PM UTC
I think it's about what Peter asks for:

https://apex.oracle.com/pls/apex/r/apex_pm/ut13/floating_labels

PowerBuilder's decades old displayformat will not help :-(
  1. Helpful
  1. mike S
  2. Monday, 18 September 2023 23:31 PM UTC
ah yeah. not sure i see the benefit of that, but i'm terrible at UX.



just change the font size via an expression - if( isnull(column), -12, -8)
  1. Helpful
  1. Arnd Schmidt
  2. Monday, 18 September 2023 23:49 PM UTC
Nope. That is not the solution. Have you checked the html css based example?!

Here is another one:

https://getbootstrap.com/docs/5.0/forms/floating-labels/

You cannot use some simple Datawindow formatting stuff for the column that shows both(!) the label _and_ the value.

  1. Helpful
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.