on 08-11-2016 5:22 PM
I created an object with two DataWindow Control (dw_filter and dw_detail) and a picture object.
I have a function to resize the object (of_resize) that is invoked from the event ue_mousemove picture object. There are two points on which I need help.
1. The object disappears when resizing.
2. I also resize the columns of the DataWindow Control
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jorge;
For the objects (like columns) in the DataWindow object you will have to keep in mind that your coding on the DW Control which is two child levels (minimal) away from itself. So the relationship would be: DC=> DWO => Column.
You can accomplish the manipulation of any object within the DW Object via either a Modify ( ) method call or using what PB calls DOT Notation. So for example, here is how I would change a columns width & height using both approaches ...
DC.Modify ("<Columnname>.Height = '150' ")
DC.Modify ("<Columnname>.Width = '5000' ")
- or in DOT notation -
DC.Object.<Columnname>.Height = '150'
DC.Object.<Columnname>.Width = '5000'
Tip: Use the DW Syntax utility to help build your PowerScript commands you need for any DW & its child object's manipulation!
HTH
Regards ... Chris
Hi, I solved with this code:
GraphicObject which_control
which_control = GetFocus() //Identificar el control que tiene el foco
IF isvalid(which_control) THEN
IF which_control <> This THEN
CloseUserObject(This)
END IF
END IF
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jorge;
I am not sure that you can reply on what THIS is pointing to - depending on what object & event you placed the above code on.
Another way to code that would be on the UO's LooseFocus event ...
THIS.Post CloseUserObject ( This )
- OR -
1) Create an instance variable: <Your UO> io_user
2) On the OpenUserObject ( ) command - use Type2 syntax...
OpenUserObject ( io_user, targetobjecttype {, x, y } )
3) On the UO's LooseFocus event ...
IF IsValid (io_user) = TRUE THEN
CloseUserObject (io_user)
END IF
HTH
Regards ... Chris
PS: If you are going to continue with your code .. I would add the following check:
IF Which_Control.TypeOf ( ) = UserObject! THEN
.....
END IF
Hi Chris;
I created a ue_checkfocus event. I have this code:
GraphicObject which_control
PowerObject which_Parent
which_control = GetFocus() //Identificar el control que tiene el foco
IF isvalid(which_control) THEN
which_Parent = which_control.GetParent()
IF which_Parent <> THIS THEN
CloseUserObject(This)
END IF
END IF
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.