Jump to content

Frederick

uniGUI Subscriber
  • Posts

    627
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Frederick

  1. Thanks. Calling UniSession.Synchronize allowed the TUniStatusBar to show the new text.
  2. Thanks. Looking at the demo, it seems that I need to treat the database processing as a main thread and update the visual controls on the side. I will explore this further. BTW, my EnableSynchronousOperations property of UniMainModule is already set to True.
  3. I have a TUniStatusBar where I have one panel with a text of "Ready". When I click a button to perform some database processing (which takes about 2 seconds), I would like to change the panel's text to "Processing..." at the start of the process. However, the panel's text never changes to "Processing...". What can I do to get the text of the panel to change immediately once the button is clicked? begin UniStatusBar1.Panels[0].Text:='Processing...'; // This is not handled? // some database processing end; -- Frederick (UniGUI Complete - Professional Edition 1.90.0.1534)
  4. The CustomCSS code for vertically aligning the text seems to do nothing. However, the gap is now gone.
  5. Please find attached. Hint: The problem occurs when the theme is uni_flat_black and not classic. statusbar2.zip
  6. I have a TUniStatusBar which I set as follows in the OnShow event of the form:- with staBar.JSInterface do begin JSCode(#1'.getRefItems()[0].setStyle("font-weight", "bold");'); JSCode(#1'.getRefItems()[0].setStyle("color", "black");'); JSCode(#1'.getRefItems()[0].setStyle("background-color", "powderblue");'); end; When the program is run, the "Ready" text in the panel is hugging the top (1) and there is a white gap on the right (2). How do I get the text to align vertically in the centre and how do I get rid of the white gap on the right? -- Frederick (UniGUI Complete - Professional Edition 1.90.0.1534)
  7. Thank you for the code. It works. I expanded it so that it automatically sets the minimum value if the entered value is below the minimum and the maximum value if it is above the maximum. procedure TMainForm.UniSpinEdit1AjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); var cValue : String; begin if EventName = 'blur' then begin cValue := Params.Values['rawValue']; if (cValue = '') or (StrToInt(cValue)<TUniSpinEdit(Sender).MinValue) then with (Sender as TUniSpinEdit) do JSInterface.JSCall('setValue', [minValue]) else if (StrToInt(cValue) > TUniSpinEdit(Sender).MaxValue) then with (Sender as TUniSpinEdit) do JSInterface.JSCall('setValue', [maxValue]); end; end;
  8. Thanks. I manage to get the entered value but I want to change the entered value to the MinValue if the value is blank. procedure TMainForm.spnEditAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); var cValue : String; begin if EventName = 'blur' then begin cValue := Params.Values['rawValue']; if cValue='' then TUniSpinEdit(Sender).Text:=IntToStr(TUniSpinEdit(Sender).MinValue); // Nothing happens here end; end; However, the code to change the entered value does not work.
  9. I have a TUniSpinEdit control with a MinValue of 1 and a MaxValue of 12. In the OnExit event, I would like to read the entered value and then change it to either the MinValue or MaxValue depending on what is entered. However, the TUniSpinEdit(Sender).Value from within the OnExit event returns the MinValue or MaxValue selected by the control and not the displayed value. procedure TfrmMain.spnEditExit(Sender: TObject); var nValue : Integer; begin nValue:=TUniSpinEdit(Sender).Value; // How to read the displayed value? lblStatus.Caption:='Value: '+IntToStr(nValue)+', Text: '+TUniSpinEdit(Sender).Text; { if <displayed Value outside range> then TUniSpinEdit(Sender).Value:=nValue; // How to set the control's value. This line does nothing. } end; How do I get this to work? -- Frederick (UniGUI Complete - Professional Edition 1.90.0.1534) tunispinedit.mp4
  10. No worries. I also never had problems with dates until version 1.90.0.1535. I have temporarily moved back to 1.90.0.1534 and am waiting to see if the next version after 1535 will fix it without me having to add the JS code for each and every date control. Thanks for your help anyway.
  11. One of my internal apps is a gardening app which I use to keep track of my gardening activities. There is no need to deploy it to a server and updating it and accessing its database is a breeze when it is installed in my PC. I don't need to access it over the Internet.
  12. Thanks, but unfortunately, it does not work. It seems that only the suggestion from Sherzod to add the code in the TUniDateTimePicker's ClientEvents.UniEvents.BeforeInit works for now.
  13. Thank you for the steps. I'll implement it and post the results here.
  14. Sherzod, This code works but I would like to send you the project anyway to investigate why I need another line of code in the event property to have it work. This would be back breaking work to have to retrofit all my TUniDateTimePicker / TUniDBDateTimePicker controls. ddmmyyyy.zip
  15. The top of the source file shows the following:- <!DOCTYPE html> <html lang="en_GB">
  16. I have several internal apps which are compiled in UniGUI 1.90.0.1534. They are not changed often and I do not wish to recompile them each time a new UniGUI version is installed. However, if I do not recompile them, they don't work because they are expecting version 1534 to be present. I tried to install the 1534 runtime but the installer complains that I should not install the runtime when a framework is present. How do I keep running the 1534 compiled apps while developing with 1535? -- Frederick (UniGUI Complete - Professional Edition 1.90.0.1535)
  17. Farshad, I am afraid that setting the ShortDateFormat to 'dd/mm/yyyy' does not fix the problem with TUniDateTimePicker in version 1.90.0.1535. In the video I have attached, my first date entry was 1st August 2020 (010820). UniGUI changes the date to 08/01/2020 which is equivalent to 8th January 2020. The second date entry is for 31st December 2020 (311220). UniGUI changes the border of TUniDateTimePicker to red, indicating an invalid date entry.. ddmmyyyydate3.mp4
  18. I have checked my TUniDateTimePicker's DateFormat property and it is always 'dd/MM/yyyy' once it is dropped on a form. It must be following my regional settings. I'll re-install 1.90.0.1535 later and post the result here. Thanks.
  19. Sorry, the event did not work. As a check, I removed 1535 and re-installed 1534 and the date entry, as per the video attached, was correct. ddmmyyyydate2.mp4
  20. Yes, it definitely worked previously since I work extensively with dates and I tend to type in dates rather than select from the drop-down box. The TUniDateTimePicker's DateFormat is also set to "dd/MM/yyyy". My localisation setting are as follows?
×
×
  • Create New...