on 10-14-2008 11:06 AM
Hi,
I expanded the width of the Sales Quotation system form and move fields to the right to allow space for new fields in the centre.
I used the oForm.Width to adjust this.
If I load the form, expand to full screen, everyhting is in the right place and looks good. However, if i adjust the form dimensions slightly and then expand to full screen the form items, system and user defined, overlap or get lost under the central tab area etc etc. To recover I have to resize the form so both X and Y scroll bars appear, close the form, and then load the form so that it appears with its system minimum dimensions.
Has anyone else experienced this? I also notice that another parameter for forms is oForm.Clientwidth, what is the difference as I can't make this work either???
I can release my addon if someone wishes to try this and see what I am experiencing or I can upload photos.
I think it just that the addon need to take care of dynamic form sizing - cater for resizing events?
Any Ideas???
Ok I have noticed something else.....
oForm.Width = oForm.Width + iUnitMove - everytime the form loads it is iUnitMove extra on width
oForm.ClientWidth = oForm.ClientWidth + iUnitMove - everytime the form loads the form GROWS by iUnitMove each time it is loaded
So my question still stands, has anyone exanded a system form to make more room and experienced the GUI problems I've experienced.
My Code is ready to email if anyone wants to test in debug mode.
Thanks,
Dave.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I did get different behaviour, if you use my snippet of code to manipulate the sales quotation form you see that item's relationship to the form is different.
I will see if I can get pics.
This is just another "rubbish" downside of SDK, "looks good if you don't resize the form"
Beginning to find these little problems tedious and frustrating!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So,
No one can tell me the difference between .width and .clientwidth on a form?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Right, Iam in the middle of my new version but this is the snippet of code that causes the problem, if not clear from this then I'll email code out later.
Private Sub oApp_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles oApp.ItemEvent
If pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_LOAD And pVal.FormType = 149 And pVal.Before_Action = True Then
Try
Dim oItem As SAPbouiCOM.Item
Dim oForm As SAPbouiCOM.Form
Dim oCombo As SAPbouiCOM.ComboBox
Dim oEdit As SAPbouiCOM.EditText
Dim oLabel As SAPbouiCOM.StaticText
Dim oXplaneItem As SAPbouiCOM.Item
Dim oYplaneItem As SAPbouiCOM.Item
Dim iUnitMove As Integer
Dim iCentralLocation As Integer
Dim iBottomCentralLoc As Integer
oForm = oApp.Forms.Item(FormUID)
'Constants
iCentralLocation = 75
iBottomCentralLoc = 40
iUnitMove = 350
'Add fields to Table for new Editbox fields
oForm.DataSources.DBDataSources.Add("OQUT")
'Rename "Owner" static text to "FSE"
oItem = oForm.Items.Item("230")
oLabel = oItem.Specific
oLabel.Caption = "FSE"
'Move Top RIght Fields to create space in middle for new date fields
oForm.Width = oForm.Width + iUnitMove
oForm.Items.Item("9").Left = oForm.Items.Item("9").Left + iUnitMove
oForm.Items.Item("88").Left = oForm.Items.Item("88").Left + iUnitMove
oForm.Items.Item("8").Left = oForm.Items.Item("8").Left + iUnitMove
oForm.Items.Item("60").Left = oForm.Items.Item("60").Left + iUnitMove
oForm.Items.Item("81").Left = oForm.Items.Item("81").Left + iUnitMove
oForm.Items.Item("11").Left = oForm.Items.Item("11").Left + iUnitMove
oForm.Items.Item("10").Left = oForm.Items.Item("10").Left + iUnitMove
oForm.Items.Item("86").Left = oForm.Items.Item("86").Left + iUnitMove
oForm.Items.Item("46").Left = oForm.Items.Item("46").Left + iUnitMove
'Move bottom right fields to create space in middle for new fields
oForm.Items.Item("23").Left = oForm.Items.Item("23").Left + iUnitMove
oForm.Items.Item("22").Left = oForm.Items.Item("22").Left + iUnitMove
oForm.Items.Item("25").Left = oForm.Items.Item("25").Left + iUnitMove
oForm.Items.Item("24").Left = oForm.Items.Item("24").Left + iUnitMove
oForm.Items.Item("283").Left = oForm.Items.Item("283").Left + iUnitMove
oForm.Items.Item("42").Left = oForm.Items.Item("42").Left + iUnitMove
oForm.Items.Item("90").Left = oForm.Items.Item("90").Left + iUnitMove
oForm.Items.Item("91").Left = oForm.Items.Item("91").Left + iUnitMove
oForm.Items.Item("89").Left = oForm.Items.Item("89").Left + iUnitMove
oForm.Items.Item("99").Left = oForm.Items.Item("99").Left + iUnitMove
oForm.Items.Item("27").Left = oForm.Items.Item("27").Left + iUnitMove
oForm.Items.Item("30").Left = oForm.Items.Item("30").Left + iUnitMove
oForm.Items.Item("29").Left = oForm.Items.Item("29").Left + iUnitMove
'Move "Copy From" & "Copy To" buttons
oForm.Items.Item("10000330").Left = oForm.Items.Item("10000330").Left + iUnitMove
oForm.Items.Item("10000329").Left = oForm.Items.Item("10000329").Left + iUnitMove
'Expand Grid in Contents Tab to fit form again
oForm.Items.Item("115").Width = oForm.Items.Item("115").Width + iUnitMove
oForm.Items.Item("116").Width = oForm.Items.Item("116").Width + iUnitMove
oForm.Items.Item("38").Width = oForm.Items.Item("38").Width + iUnitMove
oForm.Items.Item("118").Left = oForm.Items.Item("118").Left + iUnitMove
oForm.Items.Item("65").Left = oForm.Items.Item("65").Left + iUnitMove
oForm.Items.Item("75").Left = oForm.Items.Item("75").Left + iUnitMove
'Move Items in Logisitcs Tab
oForm.Items.Item("233").Left = oForm.Items.Item("233").Left + iUnitMove
oForm.Items.Item("223").Left = oForm.Items.Item("223").Left + iUnitMove
oForm.Items.Item("238").Left = oForm.Items.Item("238").Left + iUnitMove
oForm.Items.Item("224").Left = oForm.Items.Item("224").Left + iUnitMove
oForm.Items.Item("234").Left = oForm.Items.Item("234").Left + iUnitMove
oForm.Items.Item("234").LinkTo = "224"
'Move Items in accounting tab
oForm.Items.Item("156").Left = oForm.Items.Item("156").Left + iUnitMove
oForm.Items.Item("157").Left = oForm.Items.Item("157").Left + iUnitMove
oForm.Items.Item("119").Left = oForm.Items.Item("119").Left + iUnitMove
oForm.Items.Item("120").Left = oForm.Items.Item("120").Left + iUnitMove
oForm.Items.Item("124").Left = oForm.Items.Item("124").Left + iUnitMove
oForm.Items.Item("123").Left = oForm.Items.Item("123").Left + iUnitMove
oForm.Items.Item("135").Left = oForm.Items.Item("135").Left + iUnitMove
oForm.Items.Item("134").Left = oForm.Items.Item("134").Left + iUnitMove
'Hide system predicted closing date as picks 1 month later if not completed
oForm.Items.Item("12").Visible = False
oForm.Items.Item("13").Visible = False
Catch ex As Exception
MsgBox(ex.Message)
End Try
End If
End Sub
If you try this in debug mode, you will still see the system forms items affected in the way I have described.
Edited by: David Alexander on Oct 14, 2008 1:32 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi David,
could you send the addon code to me?
you can find mail address in my profile.
Thanks.
Warren
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
7 | |
6 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.