Гость
Целевая тема:
Создать новую тему:
Автор:
Форумы / FoxPro, Visual FoxPro [игнор отключен] [закрыт для гостей] / SETFOCUS v VALID / 3 сообщений из 3, страница 1 из 1
13.10.2009, 07:50
    #36246968
NTM
NTM
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
SETFOCUS v VALID
Код: plaintext
1.
2.
3.
4.
5.
IF NOT FOUND()
   SELECT  5 
   =messagebox("Net !!!")
   THISFORM.TEXT2.SETFOCUS()
ENDIF
Этот код я пишу в valid text2. А там SETFOCUS нельзя использувать. Тогда как мне возвршатся text2?
...
Рейтинг: 0 / 0
13.10.2009, 08:35
    #36246990
reware
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
SETFOCUS v VALID
NTM
Код: plaintext
1.
2.
3.
4.
5.
IF NOT FOUND()
   SELECT  5 
   =messagebox("Net !!!")
   THISFORM.TEXT2.SETFOCUS()
ENDIF
Этот код я пишу в valid text2. А там SETFOCUS нельзя использувать. Тогда как мне возвршатся text2?

В Valid пишем :
Код: plaintext
1.
2.
3.
4.
5.
6.
IF NOT FOUND()
   SELECT  5 
   =messagebox("Net !!!")
   RETURN .F. && запрет вывода фокуса из этого контрола
ELSE
   RETURN .T.
ENDIF
...
Рейтинг: 0 / 0
13.10.2009, 08:35
    #36246991
Aleksey-K
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
SETFOCUS v VALID
NTM
Код: plaintext
1.
2.
3.
4.
5.
IF NOT FOUND()
   SELECT  5 
   =messagebox("Net !!!")
   THISFORM.TEXT2.SETFOCUS()
ENDIF
Этот код я пишу в valid text2. А там SETFOCUS нельзя использувать. Тогда как мне возвршатся text2?
Ну неужели так тяжело щелкнуть правой "крысой" на событие Valid вашего textbox и выбрать Help:

If the Valid event returns true (.T.), the control can lose focus - focus might not pass to another control. If the Valid event returns false (.F.), the control does not lose focus.

The Valid event can also return a numeric value. Returning a numeric value has one of three effects:

If 0 is returned, the control does not lose focus.

If a positive value is returned, the value specifies the number of controls the focus advances.

If a negative value is returned, the value specifies the number of controls the focus moves back. For example, if the Valid event returns –1, the previous control gets the focus.

You can also use the optional ObjectName parameter in the RETURN command of the Valid event to direct where focus is assigned. The object specified must be a valid Visual FoxPro object. If the specified object is disabled or cannot receive focus, then focus is assigned to the next object in the tab order. If an invalid object is specified, Visual FoxPro keeps the focus at the current object.

You can set focus to objects in the following scenarios:

Set focus to an object on another visible form.

Set focus to an object on a non-visible Page or Pageframe control.
Надо перевести или все понятно?
С уважением, Алексей
...
Рейтинг: 0 / 0
Форумы / FoxPro, Visual FoxPro [игнор отключен] [закрыт для гостей] / SETFOCUS v VALID / 3 сообщений из 3, страница 1 из 1
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]