1. Shane Ward
  2. PowerBuilder
  3. Thursday, 1 September 2022 15:45 PM UTC

When using a Dropdown Datawindow edit style, we tend use the "Always Show Arrow" option to display/show to the user that this field is a dropdown.

But, when the "Always Show List" option is turned on, this removes/supersedes the Always Show Arrow option (hiding dropdown arrow) so now it is not obvious to our users that the field is a dropdown. 

 

We've received numerous complaints about this from our UI/UX teams and some clients as well. Is there a way to have both options turned on and allow the dropdown arrow to show?

 

The reason we are using the Always Show List option is due to logic we have built out that lets users do "type ahead" filtering of the dropdown values, meaning the DDDW is editable and users can type into it. In order to always show the list of values when they click into the DDDW field that they are filtering to, we turned on the "Always Show List" option so that users are not forced to click the arrow in order to see valid values as they type.

 

Can we request that if the Always Show Arrow option is on, that the arrow will always show regardless of other attributes being turned on/off related to the DDDW edit control?

 

Example attached of the behavior, both fields are editable (user can type into them). Expenditure Type has both attributes enabled, Charge Type only has the Always Show Arrow attribute on

 

 

Thanks,

Shane

 

 

Attachments (2)
John Fauss Accepted Answer Pending Moderation
  1. Thursday, 1 September 2022 18:25 PM UTC
  2. PowerBuilder
  3. # 1

Hi, Shane -

As you know, columns using the DDDW edit style do not behave in the manner you would like.

I've experimented with a proof-of-concept to see if there's a way to emulate the desired behavior. Here is a snapshot of an example where the column uses the DDDW edit style and has both the "Always Show List" and "Always Show Arrow" properties checked:

To accomplish this, I created a small jpg of the drop-down arrow only, placed a picture object in the DataWindow and increased the Width of Dropdown(%) above 100 until it looked right.

Be aware that in order to create the jpg of the arrow, I had to snapshot the running app since the arrow renders differently in the DW Painter. If all of your column object where you would use this are of the same height, then you'd only need a single jpg, but different column heights necessitate different images be used.

To get the list to appear when clicking on the "drop-down arrow" (picture), I put the code below in the LButtonDown event of the DW control:

Integer li_pos
Long    ll_row
String  ls_obj, ls_objname, ls_col

// The column object's name is: numbervalue
// The picture object's name is: p_numbervalue_dda (dda->DropDownArrow)
ls_obj = This.GetObjectAtPointer()
li_pos = Pos(ls_obj,"~t")
ll_row = Long(Mid(ls_obj,li_pos + 1))
ls_objname = Left(ls_obj,li_pos - 1)
If Left(ls_objname,2) = "p_" And Right(ls_objname,4) = "_dda" Then
   ls_col = Mid(Left(ls_objname,Len(ls_objname) - 4),3)
   This.Post SetRow(ll_row)
   This.Post SetColumn(ls_col)
End If

By using a naming scheme for the picture object(s), this short event script should work for any number of similar pairs of column/picture objects.

Granted, it's nowhere near as easy as having the DataWindow Engine do the work, but since it currently cannot do what you want or need, this might be an option to consider. Keep in mind there's no guarantee an enhancement request will be implemented, and even if it is, the probability is that it won't happen for some time.

Best regards, John

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.