Skip to Content
avatar image
Former Member

Event for updating caption of button

I have created a form using screen painter.I have added some textboxes and buttons as per my requirement.I want to change the caption of btnOK from OK to Update some text is typed in textbox.I tried key down event but it fired for each and every character and the speed was decremented.Which is other event which can trap the updation of form ?

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 10, 2008 at 07:40 AM

    Dilip,

    You can do it automatically with the form's AutoManaged property set to True and the Item's AffectFormMode property set to True also, or if your really what to do it manually, just catch the item's LostFocus or Validate events and change the form mode to Update.

    Regards,

    VĂ­tor Vieira

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 10, 2008 at 03:44 AM

    Hi Dilip,

    If you set the UID of the button to 1 then it will automatically change the caption from OK to Update when you change any item, unless the AffectsFormMode property of the item is set to false.

    Kind Regards,

    Owen

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 10, 2008 at 05:24 AM

    Dear Dilip Kumbhar,

    You may use the

    ItemEvent Object -> EventType Property ->

    et_FORM_DATA_UPDATE : specifies that the application updated a record in a business object.

    Please refer to SDK UI API help for more information.

    Best Regards

    Jane Jing

    SAP Business One

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 10, 2008 at 05:26 AM

    Hi Dilip,

    Set AffectsFormmode as False.Manually,set the Form mode as form.Mode=SAPbouiCOM.BoFormMode.fm_UPDATE_MODE

    this will change the caption of the button to Update.When u register in UDO,And set Affects form mode=true,it will take care of add,update,find,ok(according to that the caption of the buton changes).I hope this will help u........:)

    Kind Regards

    Mohana

    Add comment
    10|10000 characters needed characters exceeded