on 02-26-2007 10:35 PM
Well,
I wrote this code to create controls dinamically on the Employee Master form, but the only thing that doesn't work is the Visible property of a couple of textboxes that are supposed to be hidden.
With oNewTextItem
.Left = mintLeft
.Top = mintTop
.Width = intWidth
.Height = intHeight
.TextStyle = intTextStyle
.FromPane = intFromPane
.ToPane = intToPane
.Visible = blnVisible
If Not blnVisible Then
.SetAutoManagedAttribute(SAPbouiCOM.BoAutoManagedAttr.ama_Visible, SAPbouiCOM.BoAutoFormMode.afm_All, SAPbouiCOM.BoModeVisualBehavior.mvb_False)
End If
If Not oLabelItem Is Nothing Then
oLabelItem.LinkTo = .UniqueID
End If
mobjTextBox = .Specific
End With
With mobjTextBox ' data bind
If Len(Trim(strFieldName)) > 0 Then .DataBind.SetBound(True, strTableName, strFieldName)
End With
Why it .Visible and/or SetAutoManagedAttribute doen't work ?
To set the visible property of an item to true or false, the current pane must be the pane of the item.
If the form pane is 1, and your item pane is 4, you cannot change it directly.
you can freeze the form, change the form pane to 4, set the item visible property, and change back the pane to 1, and finally unfreeze the form
HTH
Sebastien
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
how to hide a control ... the SAP way!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
100 | |
11 | |
11 | |
6 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.