|
Edit Mask для строкового поля
|
|||
---|---|---|---|
#18+
Люди, подскажите, как более оригинально решить проблему пропуска позиции при редактировании строкового поля со значением времени, например 12:30 . т.е редактируем две позиции, затем курсор должен перескочить на четвертую. ... |
|||
:
Нравится:
Не нравится:
|
|||
12.03.2004, 17:48 |
|
Edit Mask для строкового поля
|
|||
---|---|---|---|
#18+
PB9 у меня это визуальный компонент: forward global type n_editmask from editmask end type end forward global type n_editmask from editmask integer width = 352 integer height = 84 integer textsize = -10 integer weight = 400 fontcharset fontcharset = russiancharset! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Arial CYR" long textcolor = 33554432 alignment alignment = center! maskdatatype maskdatatype = stringmask! end type global n_editmask n_editmask forward prototypes public subroutine u_convert_type_string () public subroutine u_convert_type_datetime () end prototypes public subroutine u_convert_type_string ();string temp_value temp_value = this.text IF temp_value = "00.00.0000" or String(Date(temp_value), "DD.MM.YYYY") = "01.01.1900" THEN temp_value = "" END IF this.SetMask(StringMask!,"") this.text = temp_value end subroutine public subroutine u_convert_type_datetime ();string temp_value temp_value = this.text IF temp_value = "00.00.0000" THEN temp_value = "" END IF this.SetMask(DateTimeMask!,"dd.mm.yyyy") this.text = temp_value end subroutine event losefocus;this.u_convert_type_string() end event on n_editmask.create end on on n_editmask.destroy end on event getfocus;this.u_convert_type_datetime() this.SelectText(1, Len(this.Text)) end event ... |
|||
:
Нравится:
Не нравится:
|
|||
15.03.2004, 10:22 |
|
Edit Mask для строкового поля
|
|||
---|---|---|---|
#18+
А Mask типа ## : ## не работает? ... |
|||
:
Нравится:
Не нравится:
|
|||
15.03.2004, 11:42 |
|
Edit Mask для строкового поля
|
|||
---|---|---|---|
#18+
В этом случае появляется возможность ввода некорректного времени! ... |
|||
:
Нравится:
Не нравится:
|
|||
15.03.2004, 12:49 |
|
Edit Mask для строкового поля
|
|||
---|---|---|---|
#18+
авторВ этом случае появляется возможность ввода некорректного времени! 1. dw - проперти на поле - Validation - Validation Expression "bla-bla-bla..." 2. dw_1.event itemchanged - скрипт "bla-bla-bla..." 3. .... .... ЗЫ. Против компонентов ничего не имею, тоже один из вариантов - только поглобальнее. ... |
|||
:
Нравится:
Не нравится:
|
|||
15.03.2004, 15:32 |
|
|
start [/forum/topic.php?fid=15&fpage=108&tid=1339246]: |
0ms |
get settings: |
8ms |
get forum list: |
12ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
68ms |
get topic data: |
12ms |
get forum data: |
3ms |
get page messages: |
45ms |
get tp. blocked users: |
2ms |
others: | 11ms |
total: | 167ms |
0 / 0 |