Jump to content

mos

uniGUI Subscriber
  • Posts

    269
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by mos

  1. Thanks Sherzod.

    I have another issue.

    I have a test app where in runtime I set the Sortable property of each of the columns to True.

    Howerver when I click on the column header the popup menu has the Sort Ascending and Sort Descending disabled.

    Here is the code I used:

    procedure TMainForm.UniDBGrid1AfterLoad(Sender: TUniDBGrid);
    var
      liX: Integer;
    begin
      for liX := 0 to UniDBGrid1.Columns.Count - 1 do
         UniDBGrid1.Columns[liX].Sortable := True;
    end;
    
    procedure TMainForm.UniDBGrid1ColumnSort(Column: TUniDBGridColumn;
      Direction: Boolean);
    begin
      ADOTable1.Close;
      ADOTable1.Open;
    end;
    
    procedure TMainForm.UniFormShow(Sender: TObject);
    begin
      ADOTable1.Open;
    end;

    Can you tell me why those menu options are not enabled?

  2. I am dynamically creating a TUniTabSheet and setting the ImageIndex := 0 to for a TUniNativeImageList that has already been assigned to an existing TUniPageControl.

    When I do this I am getting an AV in the following source code:

    function TUniCustomPageControl.GetImages: TUniCustomImageList;
    begin
      Result := FImages;
    end;

    I have attached a test project and am using UniGUI 1534 and Delphi XE2.

     

    TestTabSheet.zip

  3. Hi Sherzod,

      Attached is a test project with an external CSS file.

     If you run this project the label should change to red but it doesn't.

     If you modify the css and add !important it will change it to red.

     

    CSSTest.zip

  4. Hi Sherzod,

      The reason I need to have the color set in the external CSS file is so that I don't need to recompile the exe for different sites and can just change the CSS as needed.

       I also have a configuration dialog where the user can set the colors that will override the external CSS file colors for some labels  etc. if they choose not to modify the CSS.

      Now the code using setStyle does work if the !important is removed but removing that causes the red to not be applied to the label.

  5. I have a MainForm which contains a TUniLabel called lblHeader.

    In my external CSS file I have the following:

    .lblHeader {
      color: red !important;
    }

    Now if I don't have the !important the red color does not get applied to the label.

    The issue I have is I need to in code to be able to change the color of the label from red to blue in code.

    I tried the following code but it did not work:

    lblHeader.JSInterface.JSCode(#1'.setStyle("color","blue");');

    The above does work if I remove the !important for the red but the color red doesn't get applied.

    I also tried:

    lblHeader.JSInterface.JSCode(#1'.setStyle("color","blue !important");');

    But this does not work.

    How can I get the label to change from red to blue at runtime?

  6. Hi Sherzod,

      All you need to do is run the following demo: Framework\uniGUI\Demos\Desktop\FileUpload - Button

      Set the TargetFolder. 

      Then run the app and once the upload has completed go to the  Target Folder using Windows Explorer and try and delete the file.

     

  7. I am using a TUniFileUploadButton to upload images and when the OnCompleted event is called I need to rename the file.

    The problem I have is that the RenameFile is failing and when I use Windows Explorer to go to the directory to try and delete the file, Windows reports that the file is in use by my application.

    Therefore it would seem like the file is being locked by my application once the upload has completed and only after shutting down my app can I delete or rename it.

    I also tested this using the fupload demo app and again the file seems to be locked.

    I am using build 1534.

     

  8. I have been testing OnBrowserClose and find that it doesn't trigger for all browsers e.g. Chrome.

    I have the following code below and need some way of setting the FAllowTerminate to True so that the session will timeout and won't remain in the session list indefinitely.

    I do have a Exit button on my main form which on clicking will set the FAllowTermiate to True but if the user decides to close the tab or browser then FAllowTerminate is never set to True.

    Is there some other way of ensuring that FAllowTerminate is always set in the above case?

    procedure TUniMainModule.UniGUIMainModuleSessionTimeout(ASession: TObject;
      var ExtendTimeOut: Integer);
    begin
      if not FAllowTerminate then
        ExtendTimeOut := 3600000;  // 1 hour
    end;

     

×
×
  • Create New...