Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/11/19 in all areas

  1. The webinar was pretty good. When introducing the development tools they skipped over UniGUI very quickly. But when it came to the demo, UniGUI got the most exposure of all and attracted the most comments.
    3 points
  2. I have created some UniGUI components for my project, in that way I can re-use the visual objects that I have implemented at ease. I just wanted to share my way of doing this with you guys. Any comments, technical critiques are welcome. 1. Creating the Component Package Since I have more than one custom components, I prefer to keep them in a Deplhi Package instead of individual self registering Delphi units. So we start with creating a component package in Delphi. File > New > Other > Delphi Projects > Package 2. Adding a TUNIFrame to The Package As the base of the components, I'm using TUNIFrame. We are going to add a TUNIFrame first. File > New > Other > Delphi Projects > uniGUI for Delphi > Frame 3. Adding Child Components Decorate your new TUNIFrame with existing UniGUI components as you wish. In this example, my frame looks like the picture below. I'm also renaming the frame. In this case the name is 'frame_myunipanel'. Don't forget to save unit files to disk. I named the files as unit_myunipanel. The visual object tree is shown below: And this is how the project tree looks like. I saved package with the name 'package_myunipanel'. I have only one unit; unit_myunipanel in the project tree. Our package has some dependencies: Right click on package_myunipanel.bpl > View Source from the pop-up menu. requires rtl, vcl, vclimg, dbrtl, soaprtl, vcldb, uIndy22, uniTools22, uniGUI22Core, uniGUI22, designide, uniGUI22Chart; contains unit_reg in 'unit_reg.pas', unit_myunipanel in 'unit_myunipanel.pas' {frame_myunipanel: TUniFrame}; 4. Adding The Registrar Unit To The Project At some point, we should tell Delphi to register our new component. We can do this in a plain Delphi unit. File > New > Other > Delphi Projects > Delphi Files > Unit Now we have a new unit in the package. I'm saving this unit as 'unit_reg.pas'. This is the final appearance of our package tree: Here is the tricky part, the registration. This is the unit_reg.pas. unit unit_reg; interface uses uniGUIFrame; procedure Register; implementation uses Classes, TreeIntf, unit_myunipanel; type TFrameClass = class of TUniFrame; procedure RegisterFramesAsComponents(const Page: string; const FrameClasses: array of TFrameClass); var FrameClass: TFrameClass; begin for FrameClass in FrameClasses do begin RegisterComponents(Page, [FrameClass]); RegisterSprigType(FrameClass, TComponentSprig); end; end; procedure Register; begin RegisterFramesAsComponents('UniGUI 3rd Party', [Tframe_myunipanel]); end; end. I did not add any published properties or methods to my panel yet. This is how the unit_myunipanel looks like. You can add properties and methods to your component just like you do with VCL units. unit unit_myunipanel; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, uniGUITypes, uniGUIAbstractClasses, uniGUIClasses, uniGUIFrame, uniTrackBar, uniLabel, uniEdit, uniGUIBaseClasses, uniPanel; type Tframe_myunipanel = class(TUniFrame) UniContainerPanel1: TUniContainerPanel; UniEdit1: TUniEdit; UniLabel1: TUniLabel; UniTrackBar1: TUniTrackBar; private { Private declarations } public { Public declarations } end; implementation {$R *.dfm} end. 4. Installing the Component Right click on package_myunipanel.bpl > Install Voila! We are good to go. Now you can add this component to your UniGUI projects. PS: TreeIntf.pas is located in here: "c:\Program Files (x86)\Embarcadero\Studio\16.0\source\ToolsAPI\TreeIntf.pas" If your IDE can't find it, you might need to add it to your search path.
    1 point
  3. Hi The forum offers a lot of information / solutions ... but unfortunately distributed and not grouped. Is there a need for a structured wiki among you where you can find solutions at component level, Example: Several questions have been asked about a page control. So there will be a PageControl topic where you can find all the solutions related to the pagecontrol such as tab height, width, color and so on. If there's enough interest, i want to set this up with the help of all of us. For example one of those knowledge bases : https://preview.themeforest.net/item/knowhow-a-knowledge-base-wordpress-theme/full_screen_preview/2813111?_ga=2.90979546.195353067.1554922600-1642395990.1554922600 https://preview.themeforest.net/item/helpguru-a-selfservice-knowledge-base-wordpress-theme/full_screen_preview/8465592?_ga=2.153867000.195353067.1554922600-1642395990.1554922600 http://preview.themeforest.net/item/knowledge-base-helpdesk-wiki-faq-wordpress-theme/full_screen_preview/3434096?_ga=2.90979546.195353067.1554922600-1642395990.1554922600 Regards Peter
    1 point
  4. here is an update in case anyone faced a similar issue after I reinstalled another windows server 2016 VM I had the same issue with the new installation only for my application was not working but the demo was working fine, I tracked the issue by making a new project and finally, I found out that the UnimainModule was the reason for this issue I compared all settings in both modules but I found nothing different in the settings finally, I copied all code and components from the original uniMainModule to the new one and then replaced the files in the original project and now is working fine. regards
    1 point
  5. Just saw this on begin..end website, It's good move, Farshad, you should blog more to bring more attention to your great framework. Regards, Mohammed
    1 point
  6. onGetText Text: = FormatFloat ('###, ###, ## 0.00', TField (Sender) .AsFloat);
    1 point
  7. http://db.kontora.ua.../leaflet.dll/m/ This is Sencha touch version
    1 point
×
×
  • Create New...