Like other components, there are predefined "CSS" rules that will offer a standard and concise look to native editing components.


In addition to the default CSS, the dynamic rendering of layout is done by the procedures below and mostly use the Hint property to interpret what should be rendered.


This topic is extremely important and you need to observe the examples (Brazil / global version) and observe where they are used. (Use Delphi search to find references to these functions / procedures).



rc_BootStrapRender


Apply html/css boostrap dynamically.


The list of "commands" in this category is contained in the constant "BS_COMPONENTS"



rc_RenderControls


Applies predefined CSS classes, rounding Panels etc to objects on the current screen.


When run in Main.pas, it tunes some specific components.


The "rc_RenderControls" function can also be used when creating components at runtime or to specifically adjust just one component:


rc_RenderControls( pForm: TObject; pOnlyThisObj : TUniControl = nil )



rc_AdjustEditColors


Applies colors, font... based on theme control settings in all input components ( uniEdit, uniDbEdit etc. )



Note: Any screen you create that does not inherit these features, just add them to the respective Form / Frame OnCreate/OnReady.




To simplify, the rc_RenderLayout function was created, which includes all the necessary functions.


Under some circumstances you can call individually:


dm_rc.rc_ColorButtons( self );

dm_rc.rc_BootStrapRender( self );

dm_rc.rc_AdjustEditColors( self );


Where Self will be your FORM/FRAME.




Rendering a FRAME:


In the OnCREATE Event add:


   rc_RenderLayout( Self, false, false, true, false );

   

In the OnReady event add:


   dm_rc.rc_ResizeBlocks( Self, true, true );


Ex: frmBase



Rendering a FORM:


No Evento OnBEFORESHOW adicione:


   rc_RenderLayout( Self, true, true, true );


FORMS in UNIGUI have a slightly different rendering than FRAMES and, depending on your layout, you may need to also use:


In the OnFormCREATE event add:


   rc_RenderLayout( Self, false, false, false, false );


Ex: frmGenericModalForm, untDEMOWITHFORMMODAL...



>>> IMPORTANT


> In rendering the frame or form, add the units: Untdm_rc and Mkm_layout


> When your form is not being called by the MAIN MENU, it is necessary to add the following line in the FormDestroy event:


     mm.varC_Form_Modal := nil;


This will prevent when a MODAL FORM is active, the "dbGridUpdate" is not executed on what is "below" the MODAL, saving processing.

Created with the Personal Edition of HelpNDoc: News and information about help authoring tools and software