[1.00 Beta 1] Change font/style/size workaround.
Posted: Thu Aug 21, 2014 11:45 am
In Beta 1, setgadgetfont() is not yet implemented, here is a workaround (using Eddy's function to retrieves Element from Gadget or Window )
Code: Select all
OpenWindow(0,0,0,0,0,"",#PB_Window_Background)
TextGadget(0,10,10,200,50,"nya")
Procedure.i GadgetElement(Gadget, UseJquery.b=#True)
Protected gadgetObject=GadgetID(Gadget)
!return (v_gadgetObject && v_gadgetObject.div)? v_UseJquery? $(v_gadgetObject.div):v_gadgetObject.div:null;
EndProcedure
element = GadgetElement(0,0)
!v_element.style.fontStyle="italic";
!v_element.style.fontFamily="courier";
!v_element.style.fontSize="40px";