SOLVED: - Enable TAB Key navigation |
Post Reply |
Author | |
markmark
Senior Member Joined: 30 November 2007 Status: Offline Points: 142 |
Post Options
Thanks(0)
Posted: 27 April 2010 at 5:02am |
Hi In the example code, I cannot get the tab key to move focus from one cell item to another. Anyone know how to do this? (The arrow keys would do, just need keyboard navigation not just the mouse) Thanks Private Sub Form_Load()
Dim Column As ReportColumn Dim RecordControl As ReportRecord Dim rRecord As ReportRecord Set Column = wndReportWaste.Columns.Add(0, "Group", 80, True)
Column.EditOptions.SelectTextOnEdit = False Column.Visible = False Set Column = wndReportWaste.Columns.Add(1, "Product", 80, True) Column.EditOptions.SelectTextOnEdit = True Set Column = wndReportWaste.Columns.Add(2, "SOT", 70, True) Column.EditOptions.SelectTextOnEdit = True Set Column = wndReportWaste.Columns.Add(3, "Inner", 110, True) Column.EditOptions.SelectTextOnEdit = True Set rRecord = wndReportWaste.Records.Add()
rRecord.AddItem "1": rRecord.AddItem "Paper": rRecord.AddItem "": rRecord.AddItem "" Set rRecord = wndReportWaste.Records.Add() rRecord.AddItem "1": rRecord.AddItem "Cardboard": rRecord.AddItem "": rRecord.AddItem "" Set rRecord = wndReportWaste.Records.Add() rRecord.AddItem "1": rRecord.AddItem "Plastics": rRecord.AddItem "": rRecord.AddItem "" Set rRecord = wndReportWaste.Records.Add() rRecord.AddItem "1": rRecord.AddItem "Glass": rRecord.AddItem "": rRecord.AddItem "" wndReportWaste.AllowEdit = True wndReportWaste.EditOnClick = True wndReportWaste.Populate End Sub
|
|
Product: Xtreme SuitePro (ActiveX) version 13.0.0
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
Also set:
wndReportWaste.FocusSubItems = True |
|
markmark
Senior Member Joined: 30 November 2007 Status: Offline Points: 142 |
Post Options
Thanks(0)
|
Hi
Thanks for your reply
I have added wndReportWaste.FocusSubItems = True
which nearly gets me there, Because I have
wndReportWaste.EditOnClick = True
Tabbing into a cell item doesn't select the contents
Any Ideas?
Mark
|
|
Product: Xtreme SuitePro (ActiveX) version 13.0.0
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
there is ReportRecordItemEditOptions.SelectTextOnEdit
|
|
markmark
Senior Member Joined: 30 November 2007 Status: Offline Points: 142 |
Post Options
Thanks(0)
|
Hi
I added the code but still can't get it to work.
Could you please check my code below
Thanks very much
Mark
Private Sub Form_Load()
Dim Column As ReportColumn Dim RecordControl As ReportRecord Dim rRecord As ReportRecord Dim Item As ReportRecordItem Set Column = wndReportWaste.Columns.Add(0, "Group", 80, True)
Column.EditOptions.SelectTextOnEdit = False Column.Visible = False Set Column = wndReportWaste.Columns.Add(1, "Product", 80, True) Column.EditOptions.SelectTextOnEdit = True Set Column = wndReportWaste.Columns.Add(2, "SOT", 70, True) Column.EditOptions.SelectTextOnEdit = True Set Column = wndReportWaste.Columns.Add(3, "Inner", 110, True) Column.EditOptions.SelectTextOnEdit = True Set rRecord = wndReportWaste.Records.Add()
Set Item = rRecord.AddItem("1")
Item.CreateEditOptions Item.EditOptions.SelectTextOnEdit = True Set Item = rRecord.AddItem("Paper") Item.CreateEditOptions Item.EditOptions.SelectTextOnEdit = True Set Item = rRecord.AddItem("") Item.CreateEditOptions Item.EditOptions.SelectTextOnEdit = True Set Item = rRecord.AddItem("") Item.CreateEditOptions Item.EditOptions.SelectTextOnEdit = True Set rRecord = wndReportWaste.Records.Add()
Set Item = rRecord.AddItem("1") Item.CreateEditOptions Item.EditOptions.SelectTextOnEdit = True Set Item = rRecord.AddItem("Water") Item.CreateEditOptions Item.EditOptions.SelectTextOnEdit = True Set Item = rRecord.AddItem("") Item.CreateEditOptions Item.EditOptions.SelectTextOnEdit = True Set Item = rRecord.AddItem("") Item.CreateEditOptions Item.EditOptions.SelectTextOnEdit = True wndReportWaste.FocusSubItems = True
wndReportWaste.AllowEdit = True wndReportWaste.EditOnClick = True wndReportWaste.Populate End Sub
|
|
Product: Xtreme SuitePro (ActiveX) version 13.0.0
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
Your code works fine for me, but I have 13.3.1.
Note you don't need to set SelectTextOnEdit for both column and item, if you want the entire column like that then just set the column. Only set individual items if you don't want all items in the column to have this behavior. |
|
markmark
Senior Member Joined: 30 November 2007 Status: Offline Points: 142 |
Post Options
Thanks(0)
|
Ok, Well I can't just update every user with the new version yet.
We are on ver 13.0.0
do you know of any work about so I can Select Text On Edit after Tabing to the item with the above code.
Thanks for helping me out with this
Mark
|
|
Product: Xtreme SuitePro (ActiveX) version 13.0.0
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
Indeed, you are right, 13.0 does not behave as intended. I went back through and 13.1 is the first version to work correctly.
Here is a workaround I found to work OK, you can make the condition more strict, but here is the basic idea. You could just use selection changed if you always want it click\tab\whatever: Dim bFocusChanged As Boolean Private Sub wndReportControl_FocusChanging(ByVal NewRow As XtremeReportControl.IReportRow, ByVal NewColumn As XtremeReportControl.IReportColumn, ByVal NewItem As XtremeReportControl.IReportRecordItem, Cancel As Boolean) bFocusChanged = True End Sub Private Sub wndReportControl_SelectionChanged() On Error Resume Next If bFocusChanged Then wndReportControl.Navigator.BeginEdit End If bFocusChanged = False End Sub |
|
markmark
Senior Member Joined: 30 November 2007 Status: Offline Points: 142 |
Post Options
Thanks(0)
|
Thanks Very Very Very Much SuperMario
That did it
Cheers
Mark
|
|
Product: Xtreme SuitePro (ActiveX) version 13.0.0
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |