Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - SOLVED: - Enable TAB  Key navigation
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

SOLVED: - Enable TAB Key navigation

 Post Reply Post Reply
Author
Message
markmark View Drop Down
Senior Member
Senior Member


Joined: 30 November 2007
Status: Offline
Points: 142
Post Options Post Options   Thanks (0) Thanks(0)   Quote markmark Quote  Post ReplyReply Direct Link To This Post Topic: SOLVED: - Enable TAB Key navigation
    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

 

Mark
 
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
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 27 April 2010 at 9:14am
Also set:

wndReportWaste.FocusSubItems = True


Back to Top
markmark View Drop Down
Senior Member
Senior Member


Joined: 30 November 2007
Status: Offline
Points: 142
Post Options Post Options   Thanks (0) Thanks(0)   Quote markmark Quote  Post ReplyReply Direct Link To This Post Posted: 27 April 2010 at 11:00am
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
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 27 April 2010 at 4:20pm
there is ReportRecordItemEditOptions.SelectTextOnEdit
Back to Top
markmark View Drop Down
Senior Member
Senior Member


Joined: 30 November 2007
Status: Offline
Points: 142
Post Options Post Options   Thanks (0) Thanks(0)   Quote markmark Quote  Post ReplyReply Direct Link To This Post Posted: 28 April 2010 at 2:40am
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
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 28 April 2010 at 8:22am
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.
Back to Top
markmark View Drop Down
Senior Member
Senior Member


Joined: 30 November 2007
Status: Offline
Points: 142
Post Options Post Options   Thanks (0) Thanks(0)   Quote markmark Quote  Post ReplyReply Direct Link To This Post Posted: 28 April 2010 at 9:56am
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
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 28 April 2010 at 11:54am
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
Back to Top
markmark View Drop Down
Senior Member
Senior Member


Joined: 30 November 2007
Status: Offline
Points: 142
Post Options Post Options   Thanks (0) Thanks(0)   Quote markmark Quote  Post ReplyReply Direct Link To This Post Posted: 29 April 2010 at 3:46am
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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.176 seconds.