aldweb

Fermer I. aldweb

Fermer II. Gratuitiels PC

Fermer III. Gratuitiels Palm

Fermer IV. Partagiciels Palm

Fermer V. iziBasic Palm

Fermer VI. Connaissance Palm

Fermer VII. Ordinateur Poche

Fermer VIII. miniPortail

Spécial !



Version mobile
de l'aldweb Site

m.aldweb.com


Ni Français, ni Anglais ?

Essayez donc l'un de ces drapeaux :
[de] [es] [it] [pt]
Recherche




Météo / Spam / www

Météo Lyon


aldweb contre le SPAM


Newsletter
Pour avoir des nouvelles de ce site, inscrivez-vous à notre Newsletter.
S'abonner
Se désabonner
298 Abonnés
Sites web de la famille

Webmaster - Infos
News Amis
Visites

   visiteurs

   visiteurs en ligne

Sondage
Comment trouve-tu le nouvel habillage de l'aldweb Site ?
 
Superbe !
Joli
Moyen
Moche...
Résultats
forum.gifForum - iziBasic - Sujet n°1370

Forum - Forum
iziBasic - iziBasic


Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 257

actif  Sujet n° 1370  Exit & Input

le 05/03/2006 @ 20:58
par Nevin

Anonyme



I there a way to code so that a user can exit a program while waiting for either an "input", a "textfield" or a "numfield" command other than entering in a exit command into the field.(I am not sure if this is clear)

I guess what I am really asking is can a button (of any type) recieve commands at the same time as Numfield or textfield.
Ecrire à Nevin   Poster une réponse  Haut

[]   


Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 1
--------
le 07/03/2006 @ 01:38
par Lou

Anonyme

visiteur
If I understand your question, the presence of a field doesn't effect the button, or vice versa. When you place the field, the user can change the contents whenever he/she wants, or press a button, etc. As far as I can tell, changing the field does not generate any event. You'd use a button (maybe captioned "Enter") to generate an event that would execute code to get the field contents and do something with it. You could very well have another button to exit the form, exit the program, whatever.

Something like:

'beeps.ibas
{Creator ID "abcd"}
begin
label #2, "How many beeps?", 20, 30
numfield #1, "0", 20, 50, 60, 15
button #11, "Enter", 10, 100, 50,15
button #99, "Exit", 70, 100, 50, 15
repeat
e=doevents
if e=99 e=-1
if e=11 gosub _HandleField
until e<0
end

_Handlefield:
n$­­=field$­­(#1)
n=val(n$­­)
for i=1 to n
beep
next
return

Hope this helps.

Lou
Ecrire à Lou   Poster une réponse  Haut

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 2
--------
le 07/03/2006 @ 20:39
par Nevin

Anonyme

visiteur
I had to make a few small changes for it to work, but thanks for your help. I forgot the Doevents statement and was not using a handler. This syntax actually reminds me of Pocket C Architect. One thing I noticed is that inorder for the numfield to recieve commands automatically from the keyboard, the buttons have to be built first with the numfeild as the last object. This eliminates having to tap in the field to enter text.

Nevin
Ecrire à Nevin   Poster une réponse  Haut

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 3
--------
le 07/03/2006 @ 22:22
par aldweb

Anonyme

visiteur
Hello Nevin,

You may very well create all objects in any order and apply the SETFOCUS statement afterwards to give the focus to a given field.

Cheers,
aldweb
Ecrire à aldweb   Poster une réponse  Haut

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 4
--------
le 08/03/2006 @ 03:07
par Lou

Anonyme

visiteur
Aldweb,

Now that you mention SETFOCUS:

I've not been able to get SETFOCUS #0 to work as suggested in the manual. I have 2 TEXTFIELDS, a few buttons, a few labels, and several IMAGEBUTTONS. But when using SETFOCUS #0, the focus remains on one of the TEXTFIELDS. Any thoughts?

Also, does Palm OS support giving the focus to buttons, perhaps so that the select button of the 5 way pad would activate it? I see SETFOCUS refers only to fields, I assume there's a reason.

Lou
Ecrire à Lou   Poster une réponse  Haut
actif sujet actif   clos sujet clos   Important! Important!   Nouveau Nouveau message   -   Rectifier Rectifier message   Clôturer Clôturer sujet   Remonter Remonter
[]
Catégories de discussion  Forum 



 
^ Haut ^