Jump to content

KH0RKHE

Members
  • Posts

    6
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

KH0RKHE's Achievements

Newbie

Newbie (1/4)

0

Reputation

  1. Hello Sherzod, Allow me to clarify. Let's say I find a nice JavaScript component, for the sake of example, a notification bubble that vanishes after a while. I would like to make a uniGUI component out of that, meaning I want to be able to programmatically create this component using Delphi code. In the case of other components, I may even want to drop it at design-time. So, a Delphi component (class) must be defined to "wrap" the underlying JavaScript code: I can now create my component object by simply "TMyNotification.Create (aOwner)". this Delphi class may even be registered, so I can drop the component on the form, same as a TUniPanel. I would like to better understand how to achieve this "wrapping", or the layer between Delphi code and JavaScript code, for some existing JavaScript component? Thanks!
  2. given a JavaScript library, are there any resources on how to define a UniGUI component out of it? Thanks!
  3. This is still global, at the main module level. Will look into using unisession within controls, thanks
  4. Is there a way to add custom CSS and JavaScript, aside from the properties "CustomCSS" and "customFiles"? This approach, for large projects, would bring back the days of jQuery hell into the Delphi world, making unmaintainable spaghetti out of the sources. I'd like to add CSS, and JavaScript code with limited scope, in my descendant of a unigui control, for a modular, object oriented programming. This approach is typically used in modern web front end frameworks, such as ReactJS or Angular, to enforce isolation between our building blocks. How could this be achieved with unigui? And is this the right place to post, or should I put it in feature request? Thanks for your time
  5. ended up finding a solution that builds on top of the answer in the link. at the moment of launching a uniGUI server, I will have 2 forms created: the Main form and the uniGUI server form. All that's needed is to pick the one that is not the main form. Obviously, if others may have a different situation, the condition to find the "correct" form can simply be adapted. procedure TUniServerModuleTemplate.UniGUIServerModuleCreate(Sender: TObject); var NotifyIconData : TNotifyIconData; vForm: TForm; iForm: Integer; begin for iForm := 0 to Screen.FormCount - 1 do begin vForm := Screen.Forms[iForm]; if vForm.Handle <> Application.MainForm.Handle then break; end; FillChar( NotifyIconData, System.SizeOf(TNotifyIconData), 0 ); NotifyIconData.cbSize := SizeOf(TNotifyIconData); NotifyIconData.Wnd := vForm.Handle; NotifyIconData.uID := 1002; Shell_NotifyIcon( NIM_DELETE, @NotifyIconData ) end;
  6. I have a VCL application, which can start and shutdown various servers. One of those servers would eventually be a uniGUI server module. the files generated by the uniGUI standalone application wizard were copied into my VCL application: I am able to launch the uniGUI server, at which point the uniGUI tray icon appears, and test the default page in a web browser. Shutting down the server's listener (using FUniServerModule.Active := False), I can verify that the browser no longer loads the page, yet the tray icon remains. Following the suggestion by Tim posted in the link below, it is possible to disable this tray icon *only if* the TServerModule is the Application's main form. This is not the case for me, so how can I control the visibility of the tray icon, given that the uniGUI server's lifetime is managed by my application? Edit: this could possibly be solved if i can get a handle to the TServerModule's form. Thanks!
×
×
  • Create New...