[Gambas-user] Dumb question - testing for an empty text box

richard terry rterry at ...1946...
Thu Mar 4 09:40:50 CET 2010


On Thursday 04 March 2010 18:07:57 Ricardo Díaz Martín wrote:
> I always use for this:
> 
> If Len(TextBox1.Text) = 0 Then

But the user could have put ascii 32's in the textbox, so need to to Trim.

Richard

> 
> But is the same that wrote Stefano.
> 
> Regards,
> Ricardo Díaz
> 
> 2010/3/4 Stefano Palmeri <rospolosco at ...152...>
> 
> > Il giovedì 4 marzo 2010 00:57:32 richard terry ha scritto:
> > > I almost feel embarrassed to ask this having programmed in gambas for
> > > so long, but here goes.
> > > 
> > > simplest syntax for testing for no text in a textbox.
> > > 
> > > I currently to
> > > 
> > > if Trim(textbox1.text) = "" then
> > > 
> > > etc.
> > > 
> > > Anything better?
> > > 
> > > Richard
> > 
> > It should be:
> > 
> > IF NOT Trim(textbox1.text) THEN
> > 
> > Stefano
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > -------------------------------------------------------------------------
> > --
> > 
> > >--- Download Intel® Parallel Studio Eval
> > >
> > > Try the new software tools for yourself. Speed compiling, find bugs
> > > proactively, and fine-tune applications for parallel performance.
> > > See why Intel Parallel Studio got high marks during beta.
> > > http://p.sf.net/sfu/intel-sw-dev
> > > _______________________________________________
> > > Gambas-user mailing list
> > > Gambas-user at lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/gambas-user
> > 
> > -------------------------------------------------------------------------
> > ----- Download Intel® Parallel Studio Eval
> > Try the new software tools for yourself. Speed compiling, find bugs
> > proactively, and fine-tune applications for parallel performance.
> > See why Intel Parallel Studio got high marks during beta.
> > http://p.sf.net/sfu/intel-sw-dev
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> 
> ---------------------------------------------------------------------------
> --- Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user




More information about the User mailing list