Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #10852

Re: Required field on a Tab Control

From Franz Rachbauer <office@rachbauer.org>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: Required field on a Tab Control
Date 2017-08-11 16:35 +0200
Organization Aioe.org NNTP Server
Message-ID <omkfcl$1rhp$1@gioia.aioe.org> (permalink)
References <b51b324c-cbab-4c4d-8bde-cfeb6f4c7f4d@googlegroups.com>

Show all headers | View raw


Hi Richard,
I prevent the user from switching to another tab if some fields are not 
filled out:

METHOD TabSelect(oCNE) CLASS dtaAKO
     SUPER:TabSelect(oCNE)
     IF oDCtabControl:SelectedTab == #TABAPO	// Change AKO to APO?
	IF ... 					// Check fields fails?
	    oDCtabControl:SelectTab(#TABAKO)	// Switch back to AKO
	ENDIF
     ENDIF
     RETURN SELF

To prevent the user from closing the window you can use the method 
QueryClose:
-> RETURN FALSE no close
-> RETURN TRUE close

Regards, Franz

Am 11.08.2017 um 15:21 schrieb rkaplan328:
> I have a Tab Control with a SingleLineEdit field that must be filled in before the user
  clicks on another tab, or clicks OK on the parent window.  What is the 
best way to make
  sure this field is not blank before the user performs either one of 
these actions?
  I can warn the user by checking that the field is non-blank and 
posting a message,
  but this does not prevent the user from closing the window or 
selecting a different tab.
>

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Required field on a Tab Control rkaplan328 <richard.d.kaplan@gmail.com> - 2017-08-11 06:21 -0700
  Re: Required field on a Tab Control Franz Rachbauer <office@rachbauer.org> - 2017-08-11 16:35 +0200
  Re: Required field on a Tab Control D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2017-08-11 16:42 +0200
  Re: Required field on a Tab Control rkaplan328 <richard.d.kaplan@gmail.com> - 2017-08-11 10:14 -0700

csiph-web