1. Daniel Agudelo
  2. PowerBuilder
  3. Friday, 6 December 2019 21:01 PM UTC

Hello Guys,

I'm doing a project for use a datawindow of dynamic way at time of show it in screen, and i'm trying to do that the datawindow be able of the ubicate oneself in x and y points of the column that's focused when who's shown.

i did that so, but that never ubicate exactly were i want

someone has the knowledge that how do i can to do this?

this is that i typed for the behavior that's i wish:

dw_control.Y = ll_FieldY - dw_control.Height

i attached two files when you'll can see the behavior that's i getting :'(

Thanks everybody for your time!

PD: i'm learning English still, so, i hope that you'll can to excuse me if i typed something bad way :')

Attachments (2)
Accepted Answer
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Saturday, 7 December 2019 05:19 AM UTC
  2. PowerBuilder
  3. # Permalink

Hi,

I think I understand what you want to do.

I've attached a small sample application (pb 12.6). 

The coded events are on the main window, dw_main:

- constructor

- getfocus

- itemfocuschanged

 

dw_follow:

- constructor

 

The constructor events are just a way of showing how to check if your datawindows are in powerbuilder units and not something else like "pixels"). If they are in pixels and you cannot change that, you have to convert the y-position of the column in dw_main to Units first in your code. (PixelsToUnits())

 

Suerte un saludo!

Attachments (1)
Comment
  1. Miguel Leeuwe
  2. Saturday, 7 December 2019 05:24 AM UTC
I've noticed that when you type in more than 10 characters, the itemerror event fires and the dw_follow is back to it's original position.

To avoid that, add this code to the dw_main.itemerror event:

this.event POST itemfocuschanged(1, dwo) // dwo is an argument of the event.

  1. Helpful
  1. Daniel Agudelo
  2. Monday, 9 December 2019 15:37 PM UTC
Hi Miguel,

i'm great to read you again, your answer did works like i want, thank you so much!

Saludos!
  1. Helpful
  1. Miguel Leeuwe
  2. Monday, 9 December 2019 18:43 PM UTC
Your welcome Daniel!
  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Sunday, 8 December 2019 03:22 AM UTC
  2. PowerBuilder
  3. # 1

Greetings, Daniel -

It appears you may be attempting to emulate a column that uses the drop-down DataWindow (DDDW) edit style. Is there a reason why you are not using this native functionality within PowerBuilder? If you're not familiar with how to use a DDDW, the Appeon Community will be happy to help you learn how.

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.