GadgetHeight/Width, CanvasGadget and Dialogs

Just starting out? Need help? Post your questions and find answers here.
Cyllceaux
Enthusiast
Enthusiast
Posts: 514
Joined: Mon Jun 23, 2014 1:18 pm

GadgetHeight/Width, CanvasGadget and Dialogs

Post by Cyllceaux »

I use my own controls. All of them use the CanvasGadget.

So, my Problem is, I like the DialogManager.

The DialogManager use this

Code: Select all

GadgetHeight(gadget,#PB_Gadget_RequiredSize)
GadgetWidth(gadget,#PB_Gadget_RequiredSize)
for Gadgets to know the required size. Is there a posibility to override or set this for a CanvasGadget? So I can give my own controls a "fixed" initial heigth and with? I don't mean the xml attributes, I really mean this for the gadgets.
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 4991
Joined: Sun Apr 12, 2009 6:27 am

Re: GadgetHeight/Width, CanvasGadget and Dialogs

Post by RASHAD »

1- Use Dummy Text gadget to get the proper dimensions
2- Create your Canvas gadget with these dimensions
3- Free the Dummy text gadget
Egypt my love
Cyllceaux
Enthusiast
Enthusiast
Posts: 514
Joined: Mon Jun 23, 2014 1:18 pm

Re: GadgetHeight/Width, CanvasGadget and Dialogs

Post by Cyllceaux »

yes... this is what I do most. But it's not the same.

For example I create a button with images, Text (multi-line) and Styles. It sizes with the images and texts.
My CanvasGadget knows it exact height and width. I cant use the TextGadget for this. :(
Fred
Administrator
Administrator
Posts: 18351
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: GadgetHeight/Width, CanvasGadget and Dialogs

Post by Fred »

2 new attributes for the canvasgadget could help with this. I will see what can be done
Cyllceaux
Enthusiast
Enthusiast
Posts: 514
Joined: Mon Jun 23, 2014 1:18 pm

Re: GadgetHeight/Width, CanvasGadget and Dialogs

Post by Cyllceaux »

:oops: This would be so nice!
Post Reply