Custom controls problem
Posted: Saturday 20th February 2021 6:32am
Hi all.
I am venturing in to the world of creating custom controls.
My first try. A Custom Checkbox
I call it Tickbox
How it differs to CheckBox... (edited)
Instead of the standard little x in a box a choice of custom stock images are used Setting the "TickBox1.Type" property. (forget that)
Instead of the standard little x in a box ANY custom or stock image can be used Setting the "TickBox1.Picture" property.
Text can be positioned to the left or right using the TickBox1.TextPosition = Align.Left (or Align.Right)Increasing font size will increase the button/image size too
It's current state is...
Working but a bit lacking in a few areas.
Things i am struggling with..
how to implement the controls internal layout and AutoResize property properly.
How to get the control to display properly in the IDE without a proper install into gambas
Or even if it's possible.
It displays okay when you run a program with the controls in them but they do not show in the IDE
THE ONLY way i can get it all to look good is by adding it to gb.form , if i add it as a control to gb.form and recompile/install gb.form then it displays in the ide just fine.
How they look just as a class.. how they look if you add them to gb.form and compile... Here's the class anyway so far. you may find it interesting. It's been an education making it.
some of it is working but I am not sure how lol
BruceS
I am venturing in to the world of creating custom controls.
My first try. A Custom Checkbox
I call it Tickbox
How it differs to CheckBox... (edited)
Instead of the standard little x in a box a choice of custom stock images are used Setting the "TickBox1.Type" property. (forget that)
Instead of the standard little x in a box ANY custom or stock image can be used Setting the "TickBox1.Picture" property.
Text can be positioned to the left or right using the TickBox1.TextPosition = Align.Left (or Align.Right)Increasing font size will increase the button/image size too
It's current state is...
Working but a bit lacking in a few areas.
Things i am struggling with..
how to implement the controls internal layout and AutoResize property properly.
How to get the control to display properly in the IDE without a proper install into gambas
Or even if it's possible.
It displays okay when you run a program with the controls in them but they do not show in the IDE
THE ONLY way i can get it all to look good is by adding it to gb.form , if i add it as a control to gb.form and recompile/install gb.form then it displays in the ide just fine.
How they look just as a class.. how they look if you add them to gb.form and compile... Here's the class anyway so far. you may find it interesting. It's been an education making it.
some of it is working but I am not sure how lol
BruceS