Hi,
The definition of MaxLength Property (in the help)
Description
Gets\sets the maximum number of characters that can be entered when editing an item.
So, you can not use this property for the spinbutton value. Now, what do we want? Oh yes, adding a spinbutton. Let's look up the AddSpinButton method.
Remarks
A spin control with two buttons is displayed and you can use this button to change the cell numeric value. You can use the mk:@MSITStore:C:\Program%20Files\Codejock%20Software\ActiveX\Xtreme%20SuitePro%20ActiveX%20V12.0\Help\SymbolReference.chm::/XtremeReportControl~ReportControl~InplaceButtonDown_EV.html - InplaceButtonDown and mk:@MSITStore:C:\Program%20Files\Codejock%20Software\ActiveX\Xtreme%20SuitePro%20ActiveX%20V12.0\Help\SymbolReference.chm::/XtremeReportControl~ReportControl~ValueChanging_EV.html - ValueChanging events to determine the new value and compare it to the old value to determine which button was pressed (up or down arrow).
Oh thats wonderfull, I can actually check the value myself. Lets add these events...
Private Sub wndReportControl_InplaceButtonDown(ByVal Button As XtremeReportControl.IReportInplaceButton) ''Me.Caption = "InplaceButtonDown " & Button.Item.Value End Sub
Private Sub wndReportControl_ValueChanged(ByVal Row As XtremeReportControl.IReportRow, ByVal Column As XtremeReportControl.IReportColumn, ByVal Item As XtremeReportControl.IReportRecordItem) MsgBox "ValueChanged " & Item.Value End Sub
Private Sub wndReportControl_ValueChanging(ByVal Row As XtremeReportControl.IReportRow, ByVal Column As XtremeReportControl.IReportColumn, ByVal Item As XtremeReportControl.IReportRecordItem, NewValue As Variant, Cancel As Boolean) MsgBox "ValueChanging " & NewValue
End Sub
Huhhhh ??? This doesn't work. The ValueChanging event is fired (just before ValueChanged) when the item looses focus. So now I can check the old value with the new value??? Its a little late for that...
In the Remark: You can use the mk:@MSITStore:C:\Program%20Files\Codejock%20Software\ActiveX\Xtreme%20SuitePro%20ActiveX%20V12.0\Help\SymbolReference.chm::/XtremeReportControl~ReportControl~InplaceButtonDown_EV.html - InplaceButtonDown and mk:@MSITStore:C:\Program%20Files\Codejock%20Software\ActiveX\Xtreme%20SuitePro%20ActiveX%20V12.0\Help\SymbolReference.chm::/XtremeReportControl~ReportControl~ValueChanging_EV.html - ValueChanging events to determine the new value and compare it to the old value to determine which button was pressed (up or down arrow).
haaaaahahaha, thats very funny (which button was pressed). The new value is higher then the old value, oh yeah the button UP was pressed... I am lost here. Lots of events but no solution.
Ok, stop joking, lets get serious. Why can't we have properties like the PropertyGrid spinbutton:
- SpinButton.Max
- SpinButton.Min
It would be so much easier
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....
|