Jump to content

Frederick

uniGUI Subscriber
  • Posts

    608
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Frederick

  1. Thanks. The modified CSS works.

    Another thing is, how do I change the "your error message" to something I specify at runtime?

    Doing the following results in no hint shown:-

    var
       cVarmsg : String;
    begin
       cVarmsg:='You did not enter a value';
       edtTest.JSInterface.JSCall('inputEl.set', [edtTest.JSInterface.JSObject('"data-errorqtip":"'+cVarmsg+'"')]);
    end;

  2. I can see the hint "your error message" when I hover the mouse over the control but I can't get the control's border to be red.

    I added the following in the UniServerModule's CustomCSS property:-

    .x-form-invalid-field {
        border-color: red;
    }
     

    I tested using the OnExit event only.

    procedure TUniForm.edtTestExit(Sender: TObject);
    begin
       edtTest.JSInterface.JSCall('inputEl.addCls', StrToJS('x-form-invalid-field'));
       edtTest.JSInterface.JSCall('inputEl.set', [edtTest.JSInterface.JSObject('"data-errorqtip":"your error message"')]);
    end;
     

  3. I would like to change the border colour to clRed and display a hint when the mouse cursor is over the control when there is a validation error for TUniDBEdit.

    Is this possible? The form's AlignmentControl property is uniAlignmentClient.

    Note: I have referred to http://forums.unigui.com/index.php?/topic/7338-how-customize-red-border-validation/ but I don't know how to get it to work.

    --
    Frederick
    (UniGUI Complete - Professional Edition 1.95.0.1575)
     

  4. I upgraded to 1.95.0.1574 and setting the following properties for TUniDBFormattedNumberEdit during runtime results in:-

    TUniDBFormattedNumberEdit1.Font.Color:=clRed;  // Works

    TUniDBFormattedNumberEdit1.Color:=clYellow;  // Does not work

    How can I get the latter to work? I change the background colour from clWhite to clYellow to inform the user that there is a mistake in their data entry and this problem is causing issues with my application.

    The theme is uni_win11_polar_light. With uni_flat_black, both properties work.

  5. I think that since the older themes support a general look-and-feel but allow colour settings for the background, newer themes should allow the same customisations.

    Interestingly, Uni_Windows11 works fine with colour changes at runtime but I prefer the header colour in Uni_Win11_Polar_Light.

    Alternatively, offer the following options:-

    1.   No theme support (I can control all aspects of the look and feel of the application)

    2.  Allow users to inherit from existing themes and make changes so that the look-and-feel matches their application or their client requirements

  6. I am trying to change the background colour of a line of text in the Lines property of a TUniHTMLMemo. The following code does not change the background to clBtnface.

    <html><body style="background-color:#F0F0F0;">MemoHtmlText</body></html>

    The original background is white and I want to change it to clBtnface. What am I missing here?

    --
    Frederick
    (UniGUI Complete - Professional Edition 1.90.0.1573)
     

  7. Is there a solution to suppress vertical scroll bars for TUniHTMLMemo?

    Even with the property of ScrollBars set to ssNone and using the following code in the form's OnCreate event,  the scroll bars are not suppressed:-

    UniHTMLMemo1.JSInterface.JSAddListener('afterrender', 'function(){this.inputEl.setStyle("overflow", "hidden")}');

    --
    Frederick
    (UniGUI Complete - Professional Edition 1.90.0.1573)

  8. I am currently using the following code to change the column title colours:-

        grdGrid.Columns[0].Title.Color:=clYellow;
        grdGrid.Columns[0].Title.Font.Color:=clBlack;
        for nI := 1 to grdGrid.Columns.Count-1 do begin
            grdGrid.Columns[nI].Title.Color:=clGreen;
            grdGrid.Columns[nI].Title.Font.Color:=clWhite;
        end;

    How do I access the last 2 column's GroupHeader?

×
×
  • Create New...