[Gambas-user] Help creating user control

kobolds kobolds at ...2041...
Mon Jun 22 22:43:06 CEST 2009




Benoît Minisini wrote:
> 
>> I read how to create user control from this link
>> http://www.gambasdoc.org/help/dev/gambas
>>
>> but I still having some problem to get it work .
>> I want to create a custom control button .
>> - FButtonEX (form)
>> - ButtonEX (class)
>>
>> on the form (FButtonEX) , I drag and drop a button .
>>
>> -----------------------------------------------
>> on source FButtonEx.class
>>
>> public sub _new(optional bFile as boolean)
>> end sub
>>
>>
>> ----------------------------------------------
>> on source ButtonEx.class
>>
>> INHERITS userControl
>> export
>>
>> private frmButton as FButtonEx
>>
>> public sub _new()
>>   frmButton = new FButtonEx(false, me) as "frmButton"
>>   object.attach(frmButton, me, "frmButton")
>> end sub
>>
>> ------------------------------------------------------
>> I also put buttonex.png in the control folder
>>
>> in project property I make sure on option tabs  "this project is
>> component
>> is YES and on provide tabs ButtonEX type=control group=dialog
>>
>>
>> compile and make .
>>
>>
>> I create another project and on toolkits dialog tabs, anew icon show up
>> call buttonex . I click and drag it into the form . what it show only a
>> rectangle with nothing in it . a button that suppose to be there not show
>> up . but when I run this project the button show up .
>>
>>
>> so how do i make the button show up on the ide ?
>>
>> if I missing anything please let me know . the wiki how-to help not very
>> helpful . this is my first time try to create custom user control .
> 
> 1) The IDE cannot draw controls outside of gb.gui, gb.form and
> gb.form.mdi. 
> Instead it draws a frame with the control icon and the icon name - Like
> what 
> is done with the DrawingArea control.
> 
> 2) If you don't see that, then there is a bug in your component. Please 
> provide your source code, and I will tell you what is wrong.
> 
> Regards,
> 
> -- 
> Benoît
> 
> ------------------------------------------------------------------------------
> Are you an open source citizen? Join us for the Open Source Bridge
> conference!
> Portland, OR, June 17-19. Two days of sessions, one day of unconference:
> $250.
> Need another reason to go? 24-hour hacker lounge. Register today!
> http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 
> 

yes that all i saw on the ide . thanks for the reply . now that i know i had
done correctly.
-- 
View this message in context: http://www.nabble.com/Help-creating-user-control-tp24127891p24155081.html
Sent from the gambas-user mailing list archive at Nabble.com.





More information about the User mailing list