Unable Parentcontrol

AlkroAlkro Member Posts: 115
Hi!

I have many labels and must be superimpose all of them, but i need disable the ParentControl property because i wanna see a distinct label depends the user...

How can i do it?

Regards.

Answers

  • ara3nara3n Member Posts: 9,256
    Click on the label, click on the property menu button. Find Property ParentControl, and blank it out. This will break the link.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • AlkroAlkro Member Posts: 115
    arrrrgrrrrggggggg!!!

    Sorry. All are FRAMES and in the frames there are many labels.

    I want make VISIBLE one FRAME with its labels... All FRAMES must be superimposed.

    Thanks!

    EDIT: If a try to delete this property, an error message appear tell me that i can't delete this property, i have to DRAG the control to other place.

    I need the frames one on top the other...
  • ara3nara3n Member Posts: 9,256
    Click on Each Frame. click on property, Find Property Name.
    Give each Frame a name. Now from code you can make the frame visible or not.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • ara3nara3n Member Posts: 9,256
    Btw. Once you've given them name.
    In code hit F5 and find CurrForm->Controls->Name for each Frame. Then Click on the Right Arrow and select VISIBLE and click OK.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • AlkroAlkro Member Posts: 115
    This is the problem...

    Frame1 and Frame2

    User1 must see Frame1
    User2 must see Frame2

    Frame2 is superimpose in Frame1

    In Code (Is not exactly), i put

    if User1 then
    Frame1.VISIBLE = TRUE
    If User 2 then
    Frame2.VISIBLE = TRUE

    When user1 open the form, can see frame1 correctly
    When user2 open the form, fail and can't see anything

    Because parent control is linked to the other frame, and can't delete this property, tell me that i have to drag the frame.
  • ara3nara3n Member Posts: 9,256
    if User1 then begin
      Frame1.VISIBLE = TRUE;
      Frame2.VISIBLE = false;
    end else begin
      Frame1.VISIBLE = false;
      Frame2.VISIBLE = TRUE;
    end;
    
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • AlkroAlkro Member Posts: 115
    Not work :(

    User2 can't see anything...

    User1 OK
  • ara3nara3n Member Posts: 9,256
    Check Fram2 and see if it parent control is undefined. If it's not then when you moved the frame into the same area navision made Frame1 parent of Frame2.

    To fix this move the Frame2 out of the area and see that property turns back to undefined. Then resize it back to the same area. DO not drag and rop, because its parent property will reset. The other option is to change XPos an YPos manually.

    Once you've put them in the same location, and both have undefined parents, the code will work.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • AlkroAlkro Member Posts: 115
    Thanks :)

    Another solution:

    Two diferents Forms with many labels, and put two Subform object in principal Form.

    Regards.
Sign In or Register to comment.