Thanks for report!
]]>Shane
]]>Shane
]]>I also tried in another form and like this one it works fine on first tabpage and anyone after that does not look ok. What i can do get this to work.. now.. is make all them panels and cycle through the panels and make visible and invisible.. I really dont want to do that..
Looks like it just removed the everything but didn't resize correctly.
If freezetocell kind of works
'Sets the workbook setting
With rgBallparkReadingsBook
'Disables the tabcontrol and scrollbars
.SetSettings(WorkbookSettings.View_ShowSheetTabControl Or WorkbookSettings.View_ShowScrolls, False)
'Or WorkbookSettings.View_ShowSheetTabControl, False)
'Sets the size of the workbook
.Width = 561
.Height = 197
.Location = New Point(17, 35)
End With
'sets the worksheet setting
With rgBallparkReadingsSheet
.Reset()
'Sets the workbook size
.SetRows(8)
.SetCols(6)
'Disables
.SetSettings(WorksheetSettings.View_ShowColumnHeader Or WorksheetSettings.View_ShowRowHeader, False)
' .SetSettings(WorksheetSettings.View_ShowRowHeader Or WorksheetSettings.View_ShowColumnHeader Or
' WorksheetSettings.Edit_DragSelectionToMoveCells Or WorksheetSettings.Edit_DragSelectionToFillSerial Or
' WorksheetSettings.View_ShowGridLine Or WorksheetSettings.View_ShowFrozenLine, False)
'Sets Border for Range
.SetRangeBorders(RangePosition.EntireRange, BorderPositions.All,
New RangeBorderStyle() With {.Color = SigmaAid.Drawing.Color.UI.Border,
.Style = BorderLineStyle.Solid})
'Sets the default setting for the control
.SetRangeStyles(RangePosition.EntireRange,
New WorksheetRangeStyle() With {.Flag = PlainStyleFlag.BackColor Or PlainStyleFlag.FontAll Or PlainStyleFlag.TextColor,
.BackColor = SigmaAid.Drawing.Color.UI.Backcolor.NonSelectCell,
.TextColor = SigmaAid.Drawing.Color.UI.Forecolor.NonSelectCell,
.FontName = SigmaAid.Drawing.Font.MicrosoftJhengHeiUI.Name,
.FontSize = SigmaAid.Drawing.Font.Size.Nine})
' .FreezeToCell(1, 1, FreezeArea.Top)
'sets the worksheet setting
.SetCellData("A1", UI.InitialReadingsTitle)
.SetCellData("A3", UI.InitialReadingsTitle)
.SetCellData("A5", UI.After1stDisOrReassemblyTitle)
.SetCellData("A7", UI.After2ndDisOrReassemblyTitle)
.SetCellData("E2", UI.ReadingsTitle)
.SetCellData("F2", UI.DftTitle)
'Sets the valid range of the worksheet
'rgBallparkReadingsSheetValidRange = New RangePosition("E3", "E8")
''Sets the selection range of the validrange
'.SelectionRange = New RangePosition(rgBallparkReadingsSheetValidRange.StartPos)
End With
Hope that helps you..
What i still dont understand why it work on the first page and not another and it works fine on the forms.
Shane
The code i use to load them all the same, which why can not understand why the first load just fine and the other do not.
I use this in a tabcontrol and I use the grid in other forms and which all have tabcontrols, but the only difference i am creating all the sheet in code. this first time i am doing in the editor and loading and then changing what i need to make work the way i want it to.
This the cold i use to load the files and set the setting of the grid
Shane
Private Sub SetDefaultSheetSetting(layout As String, book As ReoGridControl, sheet As Worksheet, width As Integer, height As Integer,
selectionMode As WorksheetSelectionMode)
'Sets the workbook setting
With book
'Disables the tabcontrol and scrollbars
.DisableSettings(WorkbookSettings.View_ShowScrolls Or WorkbookSettings.View_ShowSheetTabControl)
'Disables the ScrollEndSpacing
.ShowScrollEndSpacing = False
'Sets the size of the workbook
.Width = width
.Height = height
End With
'sets the worksheet setting
With sheet
.Reset()
Using ms As System.IO.MemoryStream = New System.IO.MemoryStream(System.Text.Encoding.Default.GetBytes(UI.ResourceManager.GetString(layout)))
.LoadRGF(ms)
End Using
'Sets the selection mode of the sheet
.SelectionMode = selectionMode
.SelectionStyle = WorksheetSelectionStyle.Default
'Disables
.DisableSettings(WorksheetSettings.View_ShowRowHeader Or WorksheetSettings.View_ShowColumnHeader Or
WorksheetSettings.Edit_DragSelectionToMoveCells Or WorksheetSettings.Edit_DragSelectionToFillSerial Or
WorksheetSettings.View_ShowGridLine Or WorksheetSettings.View_ShowFrozenLine)
'Freeze to the top row on of the sheet
'.FreezeToCell(1, 1, FreezeArea.LeftTop)
End With
End Sub
This basically the same code for all the grids also
Private Sub SetComponentListWorkSheet()
'Sets the workbook and worksheet setting
Call SetDefaultSheetSetting("ComponentListWorkBook", rgComponentListBook, rgComponentListSheet, 361, 261, WorksheetSelectionMode.Range)
'sets the worksheet setting
With rgComponentListSheet
'Sets the header values
.SetCellData("A1", UI.ComponentListTitle)
.SetCellData("A2", UI.LikelihoodTitle)
.SetCellData("B2", UI.ComponentListTitle)
'Sets the valid range of the worksheet
rgComponentListSheetValidRange = New RangePosition("B3", "B10")
'Sets the selection range of the validrange
.SelectionRange = New RangePosition(rgComponentListSheetValidRange.StartPos)
'Sets the workbook flag
m_blnCLWSFlag = True
End With
End Sub
This is the same every time i load the form
When i do not use freezetocell property
Before i click or move to another page
Click on validrange for that sheet on doing that it will snap into place
See the first grid goes into snap back into place and the second does not
Fifth one does the same thing
If uses freezetocell property
still does not look right
]]>