-
Posts
627 -
Joined
-
Last visited
-
Days Won
2
Content Type
Profiles
Forums
Events
Everything posted by Frederick
-
Thanks. Calling UniSession.Synchronize allowed the TUniStatusBar to show the new text.
-
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.
-
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)
-
The text is now vertically aligned. Thank you.
-
The CustomCSS code for vertically aligning the text seems to do nothing. However, the gap is now gone.
-
Please find attached. Hint: The problem occurs when the theme is uni_flat_black and not classic. statusbar2.zip
-
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)
-
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;
-
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.
-
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
-
Your steps work great! Thanks again.
-
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.
-
Thank you for the steps. I'll implement it and post the results here.
-
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)
-
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