[Gambas-user] Dinamic menus and clicks

2010-08-06 Thread M. Cs.
The next question is, how can I retrieve the text of a menu item, which was created dinamicaly with PUBLIC FUNCTION FillMenu(MenuParent AS Menu, root AS String) DIM s AS String DIM hMenu AS Menu IF MenuParent.Children.Count > 0 THEN MenuParent.Children[0].Delete FOR EACH s IN Dir(root, "*", gb.d

[Gambas-user] gb.image: how to keep a rotated image centered

2010-08-06 Thread Kevin Fishburne
"old" Nabble is falling apart. It seems to randomly fail to accept my posts. Good times. Anyway, here's the post bypassing Nabble: I'm attempting to rotate an image about its center point, using something like: DIM background AS Image = Image.Load("grass.png") DIM f AS Float F

Re: [Gambas-user] gb.image: how to keep a rotated image centered

2010-08-06 Thread Jussi Lahtinen
There is probably more efficient ways, but quick and dirty... Here: DIM background AS Image = Image.Load("kuva1.jpg") DIM bg2 AS Image DIM f AS Float DIM ii AS Integer DIM jj AS Integer ii = background.Width / 2 jj = background.Height / 2 FOR f = 0 TO 6.2831853 STEP 0.01 Draw.Begin(DrawingArea

Re: [Gambas-user] Dinamic menu structures

2010-08-06 Thread M. Cs.
Another question: how to read the text of the selected menu item, which were dinamically created? -- This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.

[Gambas-user] gb.image: how to keep a rotated image centered

2010-08-06 Thread kevinfishburne
I'm attempting to rotate an image about its center point, using something like: DIM background AS Image = Image.Load("grass.png") DIM f AS Float FOR f = 0 TO 6.2831853 STEP 0.01 Draw.Begin(DrawingArea) Draw.Image(background.Rotate(f), 0, 0) Draw.End WAIT NEXT The resolution of the ret

Re: [Gambas-user] Dinamic menu structures

2010-08-06 Thread M. Cs.
Great, Fabien, it looks it will work! I'll write to tell if I managed to do it completely. Thanks! Csaba -- This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge h

Re: [Gambas-user] Dinamic menu structures

2010-08-06 Thread Fabien Bodard
Public Function FillMenu(MenuParent as Menu) dim s as string dim hMenu as Menu MenuParent.Children[0].Delete For each s in Dir(MenuParent.Tag,"*", gb.directory) hMenu = new Menu(MenuParent) hMenu.Text = s hMenu.Picture = Picture["icon:/small/directory"] if isDrir(MenuParent.Tag &/ s) then

Re: [Gambas-user] Dinamic menu structures

2010-08-06 Thread M. Cs.
Off course, I would like to have a menu structure where each submenu item represents a subfolder recursively. -- This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challen

Re: [Gambas-user] Dinamic menu structures

2010-08-06 Thread M. Cs.
2010/8/6 Matti > I don't understand why you want to handle this with menus. > If you want "to browse the directory structure and to point to the desired > folder", it's done with a Dialog: > > DIM myPath as String > Dialog.Title = "Look for the mobile phone" > Dialog.Path = System.Path > If D

Re: [Gambas-user] Dinamic menu structures

2010-08-06 Thread Matti
I don't understand why you want to handle this with menus. If you want "to browse the directory structure and to point to the desired folder", it's done with a Dialog: DIM myPath as String Dialog.Title = "Look for the mobile phone" Dialog.Path = System.Path If Dialog.SelectDirectory() Then

[Gambas-user] Dinamic menu structures

2010-08-06 Thread M. Cs.
My goal: Let's have a mobile phone, and I would like to send data (images, mp3) to the phone, but I don't know how the directory structure of that certain phone would look like. I would like to have a "Send to:" option which is present for e.g in Konqueror, which would enable me to browse the dire