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


Groups > comp.lang.clipper.visual-objects > #10850 > unrolled thread

Required field on a Tab Control

Started byrkaplan328 <richard.d.kaplan@gmail.com>
First post2017-08-11 06:21 -0700
Last post2017-08-11 10:14 -0700
Articles 4 — 3 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  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

#10850 — Required field on a Tab Control

Fromrkaplan328 <richard.d.kaplan@gmail.com>
Date2017-08-11 06:21 -0700
SubjectRequired field on a Tab Control
Message-ID<b51b324c-cbab-4c4d-8bde-cfeb6f4c7f4d@googlegroups.com>
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.

[toc] | [next] | [standalone]


#10852

FromFranz Rachbauer <office@rachbauer.org>
Date2017-08-11 16:35 +0200
Message-ID<omkfcl$1rhp$1@gioia.aioe.org>
In reply to#10850
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.
>

[toc] | [prev] | [next] | [standalone]


#10853

FromD.J.W. van Kooten <vankooten@removethis.ic2.com>
Date2017-08-11 16:42 +0200
Message-ID<7egrocl5rttt0b1mr150d6n6rh9hrtqdjr@4ax.com>
In reply to#10850
Replying on message of Fri, 11 Aug 2017 06:21:22 -0700 (PDT) from
rkaplan328:


Hello rkaplan328,

You can use the windows' QueryClose method. If the sle is not filled
in you prevent closing by returning false.

Preventing to select another tab when the sle is empty can be done in
TabSelect.

Dick

[toc] | [prev] | [next] | [standalone]


#10855

Fromrkaplan328 <richard.d.kaplan@gmail.com>
Date2017-08-11 10:14 -0700
Message-ID<475f57a9-9b6b-4030-b0d1-e98da14db256@googlegroups.com>
In reply to#10850
On Friday, August 11, 2017 at 9:21:24 AM UTC-4, rkaplan328 wrote:
> 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.

Thank you, Franz and Dick -- your responses seem very similar and I will try to implement.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web