[Gambas-user] How to set the input mask

ron ronstk at ...239...
Fri Dec 30 05:41:42 CET 2005


On Thursday 29 December 2005 22:20, johnf wrote:
> On Thursday 29 December 2005 12:33, ron wrote:
> > On Thursday 29 December 2005 09:36, johnf wrote:
> > > I searched and read - but do I set the input mask of a textbox to
> > > uppercase? Also where is it set?
> > > John
> >
> > 'gambas is not VB' is written somewhere. :)
> >
> > I asume you mean a mask as '###-##-##-$$' to be able
> > only to accept entering something as '123-45-67-AB'
> >
> > The VB Input Mask is not (yet) in gambas. :(
> >
> > This is a job you have to do in the key_down or key_up
> > event.
> >
> > Ron
> 
> I have that issue solved - but I still have questions.  I need help with some 
> of the overall stuff in Gambas (see earlier post).  I'm not a VB programmer - 
> In fact I have only used VB in a very limited way.  But since I can't find 
> much on Gambas I have been researching most of the questions on google using 
> VB6.  Not really a lot of help but some. 

As mentioned before they are not the same. 

Much help is to _read_ and _understand_ the examples provided with the install.
Use the build in help, yes I know it is not complete, but it will provide
almost the actual information for gambas.
At some places it is not correct to the actual version, due changes in gambas
code not yet updated in the online help.
Try in simple small projects 'how to use a component' before starting big things.


> Most of my programming has to do with Visual Foxpro. 
> VFP is OOP but has easy access to data. 
> I think VFP matches the thinking in Gambas.  

Be carefull, VFP is special for database access oriented in a simple basic like language.
Gambas is Basic language oriented and support simple basic database acccess.

In MS Access/VFP a textbox can be bind direct to a database field 
and a form is the presentation of a record in the recordset, 
you can easy walk the records almost without running code part.

For VB6 the bind of controls to the database is also posible but record 
navigation has to be done in your code, and some minor display things.

For Gambas there is no bind of controls to the backend database, 
so now all has to be done in code, navigation and display.

The technics for creating a application are almost the same but 
how to do it in code are very different.

> So what I don't know about Gambas could fill  a library.

For the most starters the same.

> Actually not knowing VB might be helpful.  At least I choose to think so.

For the part of VB code, true. 

The big problem is reading VB code and expecting the same can be done in gambas.
It is understanding what the VB code does, and translate to the correct code in gambas.
Not the copy/paste behaviour, that way you stay a dummy. :)
And the joy of creating an aplication disapears while nothing works 
and heaving no clue what is wrong and why.

> 
> John
> 

Try not read to much of VB as exact code, use it for the idea how to solve something. 
At many points there are major differences between VB and Gambas in code.
Not the structure of the code but how to access the components/controls is different.

You must see gambas as an attempt to get the Basic language to the GNU/Linux world.
The most important is to get a background engine to work, and it is doing well ATM,
and make it fast, idiot proof and flexible for enhanvements in the future.
Together with the current IDE you can say Visual Gambas.

Happy coding,

Ron




More information about the User mailing list