[Gambas-devel] failed to implement

Charlie Reinl Karl.Reinl at ...16...
Sat Sep 23 23:31:12 CEST 2006


Am Freitag, den 22.09.2006, 23:54 +0200 schrieb Fabien Bodard:
> Le Vendredi 22 Septembre 2006 00:28, Charlie Reinl a écrit :
> > Salut,
> >
> > on gambas2-1.9.42 IDE
> >
> > I wanted to have at gambas-Wellcome, the possibillity to erase some old
> > entrys from the Recent-List.
> >
> > I made a menu, which opens at a right mouse-click.
> >
> > PUBLIC SUB btnOpenRecent_Click()
> >   $sPath = LAST.Tag
> >   IF Mouse.Left THEN
> >     ME.Close
> >   ELSE
> >      mnuRecent.Popup
> >   ENDIF
> > END
> >
> > If i click on the menu.
> >
> > PUBLIC SUB mnuRecentDel_Click()
> > DIM hButton AS CCoolButton
> > DIM iElem AS Integer
> > DIM iInd AS Integer
> >
> >  iElem = aList.Find($sPath)
> >  IF iElem > -1 THEN
> >   Project.Recent.Remove(iElem)
> >   aList = Project.Recent
> >   FOR iInd = 0 TO aList.Count - 1
> >     hButton = NEW CCoolButton(svwRecent, 0, iInd * 32, 1024, 32,
> > File.Name(aList[iInd]), Project.GetIcon(aList[iInd], 24)) AS
> > "btnOpenRecent" hButton.Tag = aList[iInd]
> >     hButton.ToolTip = File.Dir(aList[iInd])
> >   NEXT
> >   IF aList.Count = 0 THEN btnRecent.Enabled = FALSE
> >   svwRecent.Refresh
> >  ENDIF
> > END
> >
> >
> > But I failed, the ScrollView isn't with me.
> >
> > I'm able to delete the Project.Recent element.
> > I remade the aList, which I set Private to the form.
> >
> > Is there a way to delete an item from the ScrollView ?
> yes and no :)
> 
> in fact the problem come from CCoolButton witch are an old fashion class.
> the scrollview have not ccoolbutton in his children collection but panels...
> 
> and then the hbutton var in FWelcome is not a true Control object so not easy 
> to destroy.
> 
> I've made a new CCoolButton class based on UserControl class. your can try 
> with it. 
> 
> with that you can do
> 
> Cbtn_Click()
> mnuDel.Tag= Last
> mnuDel.popup
> 
> end
> 
> mnuDel_Click
> CurrentCbtn.Delete
> mnuDel.tag = null
> end
> 
> >
> > Would be nice !
> >
> > Amicalment
> > Charlie

Salut Fabien,

thanks, but I think it is better to wait, till it is used in the IDE,
then I can implement the rest.

how your wine this year ?

Amicalment
Charlie







More information about the Devel mailing list