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°1492

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° 1492  image buttons without the border?

le 27/11/2006 @ 08:23
par Dave O\'Brien

Anonyme



Is there any way to use an image as a button without having the usual button border drawn around it?

I know I could use a plain IMAGE command, and then capture X-Y pen events on the screen etc., but that seems like too much work.

Does the Palm API support click events on images, or something like that?
  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 27/11/2006 @ 21:03
par aldweb

Anonyme

visiteur
This is very well possible Dave.

I did not include this option in iziBasic's BUTTON syntax, like many other options in the various controls. Otherwise, the syntax for the controls would be gorgeous.

But, since this one is often requested, I will think about a new control to draw buttons without frame, in the next release of iziBasic.

Meanwhile, you will have to use a form designed with Bird (or RsrcEdit), put that kind of button in it, and open it with the OPENFORM statement.
Or a PP applet... Nothing too difficult, I could even design it for you if you wish.

Cheers,
aldweb


@+
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° 2
--------
le 27/11/2006 @ 23:42
par Dave O\'Brien

Anonyme

visiteur
For now, I'm fooling around with this:

- Put a normal button on the screen, with an empty label.
- Put an image on top of it (completely covering it.

The button can be clicked "through" the image, so that's handy - just write a normal handler for the button event.

Clicking it brings the button to the front, so the handler has to mask the button again with another IMAGE command.

This may be good enough until iziBasic offers an IMAGEBUTTON without the frame. Stay tuned... ;^)
  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 29/11/2006 @ 23:01
par aldweb

Anonyme

visiteur
Hey Dave, this is a very smart way of doing.

Do you get any display side effect, like seeing the button's frame at some point? (especially if you keep the pen down on the button)

On my side, I checked the options offered by PalmOS when creating dynamically a button. Unfortunately, creating a button without frame would require some tricking on a ButtonFrameType parameter in the ControlAttrType of the button. And there here is what PalmOS specifies: "Your code should treat the ControlAttrType structure as opaque. Use the functions specified in the descriptions below to retrieve and set each value. Do not attempt to change structure member values directly.". The advice is very clear!

Now I remember why I did not offer this option in the BUTTON statement definition!

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 02/12/2006 @ 10:32
par Dave O\'Brien

Anonyme

visiteur
The button shows through while the pen is down.

The PUSHBUTTON works better for square button images because it's also square. (Normal BUTTONs are rounded, which doesn't match up so well.)

Seems to work pretty well, all told. Try out the Kaleida app to see it in action.
  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° 5
--------
le 02/12/2006 @ 18:20
par aldweb

Anonyme

visiteur
Hello Dave,

My two children love this Kaleida app

I will dig into your source code to learn how you managed to draw thick lines

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° 6
--------
le 03/12/2006 @ 02:43
par Dave O\'Brien

Anonyme

visiteur
For thick lines:
- I offset the starting and ending coordinates 1 pixel up from the original point, and draw a second line.
- I offset them 1 pixel left of the original point, and draw a third line.

For full symmetry, I should also draw the right and bottom offset lines, but I thought that may slow things down too much. The first 2 offsets seem to work well enough.

At some point I'll go back and look at the post about WAITEVENT, to see if I can get the drawing to respond quicker.

I also played around a bit with sound tones tied to X and Y offsets from the center, but I'll have to improve that before enabling it as an option.

Cheers!
  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° 7
--------
le 03/12/2006 @ 22:38
par aldweb

Anonyme

visiteur
Thank you Dave for the explanations.



@+
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° 8
--------
le 22/12/2006 @ 11:11
par aldweb

Anonyme

visiteur
Hello Dave,

Kaleida is a hit!
It is one of the Top 50 downloads at PalmGear this month!
Look here: http://www.palmgear.com/index.cfm?fuseaction=software.top50month

Good job Dave!

Cheers,
aldweb


@+
aldweb
Ecrire à aldweb   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 ^