I should have thought a 'Muir" would have come and helped! (I had a an old friend named Ted Muir who allways helped me in a bind- he's passed away now. You couldn't have a better name.) Thanks a bunch!
JB Richard Muir-Gladman wrote: > > I use this code to create my "picture boxes" which are actually buttons. > I did this because I couldn't find a click event for a picture box. > > PRIVATE SUB addPicture(pName AS String, title AS String, id AS Integer) > DIM f AS Frame > DIM p AS Button > > f = NEW Frame(scrPictures) > f.Text = Left$(title, 15) > f.w = 130 > f.h = 130 > > p = NEW Button(f) AS "pictureItem" > p.Name = pName > p.tag = id > p.ToolTip = title > p.W = 100 > p.h = 100 > p.x = 14 > p.y = 21 > > p.Picture = Picture.Load(Global.pictureCache &/ "thumbs" &/ pName) > > END > > This is the click handler for the button > > PUBLIC SUB pictureItem_Click() > DIM f AS NEW PictureDetail > f.id = LAST.tag > f.ShowDialog > END > > It's not exactly what you wanted but it does work quite nicely > > Richard. > > On Sat, 2009-03-28 at 13:15 -0700, jbskaggs wrote: >> I want to be able to spawn a series of indentical pictureboxes then if I >> click on an individual pixturebox get it to run code for that picturebox. >> >> I can genrate the pictureboxes just fine with the =new picturebox but >> then I >> cant use the picturebox with Public sub picturebox_mousedown() command as >> I >> would a picturebox I drew. How would I go about doing that and giving >> the >> pictureboxes unique names that I can use with the mouse. >> >> So could somebody give a little example that generates three or four >> identical pictureboxes and how I can use the _mousedown or _click events? >> >> Pretty please:jumping: >> >> JB SKaggs > -- > Quantum materiae materietur marmota monax si marmota monax materiam > possit materiari? > (How much wood would a woodchuck chuck if a woodchuck could chuck wood?) > > Registered Linux User: #459086 > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > -- View this message in context: http://www.nabble.com/SPawing-pictureboxs-tp22760869p22761344.html Sent from the gambas-user mailing list archive at Nabble.com. ------------------------------------------------------------------------------ _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user