Jump to content
uniGUI Discussion Forums

Frederick

uniGUI Subscriber
  • Content Count

    168
  • Joined

  • Last visited

Posts posted by Frederick


  1. In Delphi's IDE, a disabled TUniLabel appears as such. When the application runs in the browser, the TUniLabels do not appear to be disabled.

    How do I get them to look disabled like in Delphi's IDE?

    Note: I added the following code from an earlier forum message in the ServerModule's CustomCSS but there is no change

    .x-unilabel.x-item-disabled {
       opacity: 0.3;
    }

    --
    Frederick
    (UniGUI Complete - Professional Edition 1.90.0.1514)
     

    TuniLabelDisabled.png


  2. 25 minutes ago, Sherzod said:

    Does it work on Delphi VCL?

    I tried it in Delphi 10.3.2 VCL and interestingly, it does not work.However, I don't use this Delphi version for Windows programs. When I tried it in Delphi 7, it just works natively without having me to implement any code. It could be because of one of my third-party libraries.

    Anyway, I found the following code to use in Delphi 10 and it works perfectly in the Windows program.

    procedure TForm1.Edit1KeyDown(Sender: TObject; var Key: Word;
      Shift: TShiftState);
    begin
      if (Key = VK_INSERT) and (Shift = []) then
        InsertOn := not InsertOn;
    end;

    procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
    begin
      if ((TEdit(Sender).SelLength = 0) and
          (not InsertOn)) then
        TEdit(Sender).SelLength := 1;
    end;

    In UniGUI, the OnKeyDown code is compilable. However, Delphi chokes on the OnKeyPress code because it says that SelLength is not a member of TUniDBEdit. What code can I create to simulate the SelLength property?


  3. While inside either TUniDBEdit or TUniEdit, pressing the Insert key to toggle between the insert and overwrite state does not seem to have any effect for typing text. The state is always in Insert mode.

    How do I get UniGUI to toggle the insert/overwrite state when I press the Insert key and how to I check and display the Insert/Overwrite status?

    --
    Frederick
    (UniGUI Complete - Professional Edition 1.90.0.1514)
     


  4. 8 minutes ago, Sherzod said:

    One possible solution...

    
    procedure TMainForm.UniCalendarPanel1ViewChange(Sender: TUniCalendarPanel;
      CurrentView: TUniCalendarViewType);
    begin
      (Sender as TUniCalendarPanel).JSInterface.JSCode(#1'.down("[xtype=segmentedbutton][value=month]").hide();');
    end;

     

    This works. Thanks.


  5. 1.   What is the maximum number of calendar IDs I can use for each date?

    2.   I have three events for a date and their IsAllDay properties are True. Their calendar IDs are 1, 2 and 3 respectively. In the calendar panel, the first event is shown while the second and third events are designated by the "+2 more" text. If I change the calendar IDs to 1, 2 and 4 respectively, the same result is seen.

    However, if I change the calendar IDs to 1, 2 and 5, the third event is missing. What is happening here?

    --
    Frederick
    (UniGUI Complete - Professional Edition 1.90.0.1514)
     

    calendarids.png


  6. 1 - I only have the property ShowMonthView set. Is it possible to hide the Month button since it is redundant and clicking it does nothing?

    2 - How do I change the background colour, font size, font style or font type of the header row?

    3 - Is it possible to change the background colours of the entire weekend columns?

    4 - Is it possible to highlight today's date by changing the font style and background of the cell?

    5 - Is it possible to change the cell background of cells with events?

    --
    Frederick
    (UniGUI Complete - Professional Edition 1.90.0.1514)
     

    tunicalendarpanel.png


  7. When I am within a TUniDBMemo, I want to be able to press the ENTER key to insert a carriage return and line feed within the memo.

    Based on an earlier forum post, I entered the following:-

    UniDBMemo1 -> ClientEvents -> ExtEvents ... add keydown fn:

    function keydown(sender, e, eOpts)
    {
      if (e.getKey() == e.ENTER) {
        e.stopPropagation();
      }
    }

    However, UniGUI is not responding to the above event. If the ENTER key is pressed within the memo, focus moves to the next component of the form.

    My form's KeyPreview is True while the NavigateKeys.Next.Key is set to 13. Setting the former to False or disabling NavigateKeys on entering the memo control does nothing.

    What am I missing here?

    --
    Frederick
    (UniGUI Complete - Professional Edition 1.90.0.1514)
     


  8. 11 hours ago, Hayri ASLAN said:
    
    procedure TMainForm.UniFormCreate(Sender: TObject);
    begin
      with UniDateTimePicker1, JSInterface do
      begin
        JSAddListener('collapse', JSFunction('', 'ajaxRequest('#1', "collapse");'));
        JSAddListener('expand', JSFunction('', 'ajaxRequest('#1', "expand");'));
      end;
    end;

     

    Hi Hayri,

    Delphi is throwing up the attached error at the following line:-

    JSAddListener('collapse', JSFunction('', 'ajaxRequest('#1', "collapse");'));

    datStarting is my control's name.

    P.S.   When you refer to OnAjaxRequest event of the control, you are actually referring to OnAjaxEvent?

    nodefaultjsobj.png

×