Issue 21860 - Autorepeat to be added to Form Controls
Summary: Autorepeat to be added to Form Controls
Status: CLOSED FIXED
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: OOo 1.1
Hardware: PC Windows XP
: P3 Trivial (vote)
Target Milestone: OOo 2.0
Assignee: christoph.lukasiak
QA Contact: issues@dba
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-29 14:49 UTC by kelvine
Modified: 2006-05-31 14:29 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
suggested patch to SpinField class (1.27 KB, patch)
2003-10-30 14:20 UTC, Frank Schönheit
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description kelvine 2003-10-29 14:49:03 UTC
Hi,

I thought I would suggest that autorepeat be added to the Form Controls that 
can have the property Spin=Yes.

The controls which I have found so far that this could be added are:
Date Field
Time Field
Numerical Field
Currency Field
Formatted Field

This would then align the functionality of these controls with the new 
Spinbutton and Scrollbar controls.

Thanks

Kelvin
Comment 1 Frank Schönheit 2003-10-29 15:41:42 UTC
grabbing and confirming
Comment 2 Frank Schönheit 2003-10-29 15:48:37 UTC
fs->ssa: The VCL control (SpinField) already supports this. Since
implementing issue 21277 and issue 21605 (scroll bar and spin button
controls), our toolkit implementations *also* support this in general,
so adding this functionality is really simple - I just have to declare
that the respective control models should support this property.

(Event better: It's equally simple to add this to button controls)

However, there's one thing: To be consistent, it would make sense to
also specify the repeat delay, which is used when keeping the mouse
pressed over the spin buttons. This is what is available for scroll
bars and spin buttons now, and would make a lot of sense for the other
fields.
The SpinField uses (like the SpinButton before) some hard-coded values
for this delay. In opposite, the PushButton uses timeouts as specified
in the MouseSettings.

I would like to not only add the "Repeat" flag (which, as said, is
trivial), but also the "Repeat Delay" setting. For this, we would need
to teach the SpinField to (alternatively) get it's timeouts from the
settings.

What's your opinion about this? Should we simply change this for all
SpinFields? Should we add an option to the SpinField. Should we do
nothing at all and better not touch this control?
(Would it influence your opinion if I'd tell that I'd be willing to do
this change in VCL myself? :)
Comment 3 Frank Schönheit 2003-10-29 15:51:52 UTC
forgot to mention:
The defaults for the delay in the settings are 370/50 (the first is
the timeout until the very first repeat, the second the time between
succeeding repeats), for SpinFields, values of 280/60 are hard-coded.
So, IMO, it wouldn't change very much if we *always* use the settings ...
Comment 4 stephan_schaefer 2003-10-29 17:24:51 UTC
Using the settings and getting rid of hard coded timings is always a
good thing to do - implementing it by yourself is even better (hey,
it's open source after all...)

I don't see any problems in this extension and I don't think we should
make it optional. As I understand, you just want to use the same
timings as for scrollbars and spinbuttons, right ? Perhaps MT has an
idea where those hard coded constants came from, but if it's still
usable do it.

Comment 5 Frank Schönheit 2003-10-30 14:20:01 UTC
Created attachment 10784 [details]
suggested patch to SpinField class
Comment 6 Frank Schönheit 2003-10-30 14:25:51 UTC
talked with MT, he can't imagine any reason why the hard coded values
were there. SO I'm going to apply to attached patch to spinfld.cxx.

Thanks Stephan!
Comment 7 Frank Schönheit 2003-10-30 15:17:22 UTC
added fix (actually only a few lines besides the patch attached here)
to CWS frmcontrols01.
Comment 8 Frank Schönheit 2003-12-02 12:11:33 UTC
fs->clu: please verify in CWS frmcontrols01
Comment 9 christoph.lukasiak 2003-12-08 16:31:23 UTC
verified in cws
Comment 10 christoph.lukasiak 2003-12-08 16:32:03 UTC
verified
Comment 11 christoph.lukasiak 2003-12-22 15:14:42 UTC
verified in master (680m19-1)

available in next outcomming version
Comment 12 hans_werner67 2004-02-02 12:26:02 UTC
change subcomponent to 'none'