Focus on a Case |
Post Reply |
Author | |
sisge
Newbie Joined: 04 June 2008 Status: Offline Points: 5 |
Post Options
Thanks(0)
Posted: 04 June 2008 at 12:03pm |
Hey,
I'm controlling the value of an item after the item lost focus and when it's a wrong value, I'd like to have the focus back to this item.
I tried making the item "focusable" or using rptcontrol.SetFocus but I can't make it work.
Anybody would have an idea.
Thanks !
|
|
Phillip
Newbie Joined: 31 March 2008 Location: South Africa Status: Offline Points: 6 |
Post Options
Thanks(0)
|
You could try BeginEditAt method call. This will position the report control to a specific row/column intersection.
Regards.
|
|
sisge
Newbie Joined: 04 June 2008 Status: Offline Points: 5 |
Post Options
Thanks(0)
|
Thanks for your answer.
I have a problem though, maybe stupid, but I can't find the beginedit function. In the object browser, I'm only finding it as an event.
Do I have to change some settings before ?
Thanks again !
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
BeginEditAt is only available in V12.0
BeginEdit is available in V11.2 (I don't know if available in earlier versions)
wndReportControl.Navigator.MoveToColumn 1
wndReportControl.Navigator.MoveToRow 1 wndReportControl.EditItem wndReportControl.FocusedRow, wndReportControl.FocusedColumn This will select row 1 and column 1 and will set the item in editmode
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
sisge
Newbie Joined: 04 June 2008 Status: Offline Points: 5 |
Post Options
Thanks(0)
|
Thanks Aaron for your quick answer.
So I tried and it seems it's focusing on the item but maybe I was wrong using the word "focus". So I'm trying to upload a picture to explain probably better than me.
So here is what I get.
Here is what I'd like to have.
I'd like that when people are wrong typing the item, it's already ready to type again.
Also, I have the v12.0 but I didn't find the Begineditat (but maybe it's also only to focus on the item, not make it ready to type).
Hope I'm not complicate to understand.
Thank you !
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
Is that a microfilm, I don't have equipment to read that
You can upload a larger image so I could really see what you mean, its soooo tiny.
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
younicke
Senior Member Joined: 11 March 2005 Status: Offline Points: 107 |
Post Options
Thanks(0)
|
aaron you have to click on the image
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Wow, I DO have the equipment, just a mouse will do the trick
Thanks
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
You are right @sisge, there's no method BeginEditAt
BeginEditAt is not available in V12.0 (I don't know what version Philip installed? maybe V12.1 ?) My mistake as well, sorry
Can you upload a sample, I think it will be easier than explaining all options here. Please attached some info what you want me to do.
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
sisge
Newbie Joined: 04 June 2008 Status: Offline Points: 5 |
Post Options
Thanks(0)
|
Hi !
First, thanks a lot for the time you already spent helping me.
I cheated and used the example of wishmerhill and adapted it to my case.
So here it is :
Thanks again Sir !
|
|
Phillip
Newbie Joined: 31 March 2008 Location: South Africa Status: Offline Points: 6 |
Post Options
Thanks(0)
|
Apologies. I meant to mention the EditItem and BeginEdit methods (I used these two to construct my own BeginEditAt function).
|
|
wismerhill
Newbie Joined: 16 May 2008 Status: Offline Points: 10 |
Post Options
Thanks(0)
|
Hello,
I find how to focus on a case but with a button. This code works : Public Sub Btn_Move_Click() 'RptControl.EditItem Row, Column RptControl.FocusSubItems = True RptControl.Navigator.MoveToColumn 1 RptControl.Navigator.MoveToRow 4 RptControl.Navigator.BeginEdit End Sub but when i try to do the same in the event ValueChanged of the report, that do not work cause the click on another cells is the last step : Value modified --> Move to cells(4, 1) --> set focus cells(4, 1) --> click on another cells Do you know any other events where we can do the move function in last step ? |
|
wismerhill
Newbie Joined: 16 May 2008 Status: Offline Points: 10 |
Post Options
Thanks(0)
|
Remarks :
When i try the SelectionChanged Event, i have the following error : Run-time error '28': Out of stack space Do you know what it means ? |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi, Add a timer and let the timer sub do this job
Private Sub RptControl_ValueChanged(ByVal Row As XtremeReportControl.IReportRow, ByVal Column As XtremeReportControl.IReportColumn, ByVal Item As XtremeReportControl.IReportRecordItem)
'The timer is necessary because the value changed event will be finished first. 'If you would set: RptControl.EditItem RptControl.FocusedRow, RptControl.FocusedColumn in this sub 'it will have no effect. If Item.Value < 100 Timer1.Enabled = True
End If End Sub Private Sub Timer1_Timer()
RptControl.Navigator.MoveToColumn currentSelectedCol RptControl.Navigator.MoveToRow currentSelectedRow RptControl.EditItem RptControl.FocusedRow, RptControl.FocusedColumn Timer1.Enabled = False End Sub Now you can use any event where reference of row/column is returned
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
sisge
Newbie Joined: 04 June 2008 Status: Offline Points: 5 |
Post Options
Thanks(0)
|
It's working. Thanks a lot !!
|
|
wismerhill
Newbie Joined: 16 May 2008 Status: Offline Points: 10 |
Post Options
Thanks(0)
|
I tought to use a Timer but hope I would try to find another way to solve the problem ;) Thanks anyway |
|
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 |