cancel
Showing results for 
Search instead for 
Did you mean: 

Matrix: fixed column width

Former Member
0 Kudos

Hi Experts

How I can disable changing of the column(s) width in the matrix?

Thanks

Sierdna S

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

The only way is disable the click on header - catch click in itemeevent anf pval.row = 0 set bubbleevent.

Former Member
0 Kudos

Hi Petr

Thank you for reply.

I have done the proof, but it does not work. I enclose my code.

Andrei


Private Sub SBO_Application_ItemEvent( _
   ByVal FormUID As String, _
   ByRef pVal As SAPbouiCOM.ItemEvent, _
   ByRef BubbleEvent As Boolean _
) Handles SBO_Application.ItemEvent

  Dim oForm As SAPbouiCOM.Form
  oForm = SBO_Application.Forms.Item(FormUID)
  
  Select Case pVal.EventType
    Case SAPbouiCOM.BoEventTypes.et_CLICK
	If pVal.Row = 0 _
	And pVal.FormUID = FormUID _
	And pVal.ItemUID = "mtx00" _
	Then
	  SBO_Application.SetStatusBarMessage( _
		"STOP...", _
		SAPbouiCOM.BoMessageTime.bmt_Short, False)
	  BubbleEvent = False
	End If
    '...
  End Select

End Sub

Former Member
0 Kudos

If you use Event Logger you can see no events raised when you resize matrix column.

I think isn't possible to lock column width by events.

Edited by: Roberto Montenovo on Jul 25, 2008 11:40 AM

Edited by: Roberto Montenovo on Jul 25, 2008 11:41 AM

Former Member
0 Kudos

Roberto is true, its not possible. Im using it to prevent changing the caption of column, but the size is possible to change. Sorry for bad way.

Former Member
0 Kudos

Hi,

You have a right: I have used event logger, and it dosn't give nothing messages when I change the column's width.

Thank you.

P.S. [Event logger: rezising columns.|http://img512.imageshack.us/img512/4316/imgvf3.jpg]

Former Member
0 Kudos

Hi Petr.

I close this question.

To the point: are you found the solution for this thread [Matrix double-header|; ?

Thank you.

Andrei

Former Member
0 Kudos

In that thread I did something else, but the part with disabling changing of width in column was solved with edittext over the matrix header and fixed form size. When over the header is edittext, user has no chance to click to header and change the width.

Former Member
0 Kudos

Petr,

Thank you very match.

I has found what work this: 2 captions above the matrix: click on the matrix headers / captions => resize the columns to standard widths.

Good weekend

Andrei

P.S. Code


...
Select Case pVal.EventType
  Case SAPbouiCOM.BoEventTypes.et_CLICK
      If pVal.BeforeAction _
      And pVal.FormUID = sFormUID _
      And ((pVal.ItemUID.Equals("lRic") Or pVal.ItemUID.Equals("lCon")) _
	   Or (pVal.Row = 0 And pVal.ItemUID.Equals("mtx00"))) _
      Then
	  SBO_Application.SetStatusBarMessage( _
		  "Stop columns resizing.", _
		  SAPbouiCOM.BoMessageTime.bmt_Short, False)
	  Call Matrix_SetColumnsWidths(oForm)
	  BubbleEvent = False
      End If
...

Edited by: Sierdna S on Jul 25, 2008 1:56 PM

Answers (0)