Jump to content

skafy

uniGUI Subscriber
  • Posts

    216
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by skafy

  1. How can I change StringGrid height dynamically depending on height of rows. I'm trying to get height of each row, but I allways get 0.

    for i := 0 to RowCount - 1 do
      inc(MyHeight, RowHeights[i]);
    end;
    

    At the end MyHeight is allways 0. So how can I get StringGrid actual rows height so there wouldn't have to be scroller inside.

  2. I would like to have a timer witch will run every 30 seconds. It has to start when application starts and should not be attached to sessions. So my question is how can I use global variable Timer. I've put it in ServerModule but than I can't use it on mainModule data.

    procedure TUniServerModule.UniGUIServerModuleCreate(Sender: TObject);
    begin
      Timer1.Enabled:= True;
      Send:= False;
    end;
    
    procedure TUniServerModule.Timer1Timer(Sender: TObject);
    var
      Time: TTime;
    begin
      Time:= StrToTime(TimeToStr(Now));
      if Send then
      begin
        if (Time > StrToTime('12:12:00')) AND (Time < StrToTime('12:13:00')) then
          Send:= False;
      end
      else
      begin
        if (Time > StrToTime('12:11:00')) AND (Time < StrToTime('12:12:00')) then
          Send:=
    end;
  3. Hello,

     

    I've created Standalone Application at the start and then I tranformed it into a ISAPI module (comment line for GUI in project source)  witch I've put on IIS 7.5. When I call .dll first form shows as it should, but when I click some data on DBGrid it should open new form with details of that record. In standalone app works fine, but as ISAPI modulu it doesn't. I've checked log and there is this.

     

    Workflow: 00001E24: 07:23:21 []:--------------------------------------------------------------
    Workflow: 00001E24: 07:23:21 []:Starting Server. Module Handle: 00000000022A0000
    Workflow.dll: 00001E24: 07:23:21 [TUniServerModule]:Server First Init.
    Workflow.dll: 00001E24: 07:23:21 [TUniServerModule]:Erasing Cache Folder...
    Workflow.dll: 00001E24: 07:23:21 [TUniServerModule]:Cache Folder Erased. <0> Files deleted.
    Workflow.dll: 00001E24: 07:23:21 [TUniServerModule]:HTTP Server Started.
    Workflow: 00001E24: 07:23:21 []:Server Started. Module Handle: 00000000022A0000

     

    Does this error tell you enything what I am doing wrong?

     

    Best regards.

  4. Hello,

     

    How can I set so that form will move like browser. So I would like that form open in maximized option. But when I reduce browser width for 200px then form should also shrink for 200px. I would to have form mixemized and all anchors set (akleft,aktop,akbottom, akright). How can i achive anchors effect. I set Maximized Window state.. and aligmentControl to uniAlignmentClient... but it doesnt work.

  5. How to set width of columns to automaticly fit the StringGrid.

     

    I tried function witch worked for me on DBGrid component but it doesn't work here.

     

    function columnresize(ct, column, width, eOpts)
    {
      if (column.fedit) {
        column.fedit.setWidth(width - 2)
      }
    }

     

    please help.

     

    Best regards

  6. How to set width to automaticly fit the StringGrid.

     

    I tried function witch worked for me on DBGrid component but it doesn't work here.

     

    function columnresize(ct, column, width, eOpts)
    {
      if (column.fedit) {
        column.fedit.setWidth(width - 2)
      }
    }

     

    please help.

     

    Best regards

  7. Hi,

     

    I'm sorry, maybe in your project somewhere there is a mistake,

    but it works for me, also works ajaxRequest:

     

    Can you make a simple testcase ?!

     

    Best regards.

    I think I found the problem. In the ServerModule I have set MainFormDisplayMode to mfPage. Can you confirm?

  8. I've put this simple line of code in windows.show simple alert code and "Hello ExtJS" doesn't pop up. What could be wrong?

    function window.show(sender, eOpts)
    {
      alert("Hello ExtJS");
    }
    

    Hi,

     

    Seems all is correct..

     

    call function UniFormAjaxEvent in main form Main (renamed MainForm) ???  - Check please again..

    yes. I renamed default named MainForm to Main

  9.  

    in client code "MainForm.ClientEvents.ExtEvents.Show" (for example)

    function window.show(sender, eOpts)
    {
      var WinNetwork = new ActiveXObject("WScript.Network");
      ajaxRequest(sender, 'UserDetailsEvent', ['UserName='+WinNetwork.UserName]);
    }
    

    in server code:

    procedure TMainForm.UniFormAjaxEvent(Sender: TComponent; EventName: string; Params: TStrings);
    begin
      if EventName='UserDetailsEvent' then begin
        UniEdit1.Text:=Params.Values['UserName'];
      end;
    end;
    
    

    It seems like UniFormAjaxEvent doesn't catch/fire UserDetailsEvent. When I debug EventName is equal to cinfo, afterrender and resize.

     

    I've put AjaxRequest in window.show.

    function window.show(sender, eOpts)
    {
      var WinNetwork = new ActiveXObject("WScript.Network");
      ajaxRequest(sender, 'UserDetailsEvent', ['UserName='+WinNetwork.UserName]);
    }

    and

     

    call function UniFormAjaxEvent in main form Main (renamed MainForm)

    procedure TMain.UniFormAjaxEvent(Sender: TComponent; EventName: string;
      Params: TStrings);
    begin
      if EventName='UserDetailsEvent' then
      begin
        CurrentUser:= Params.Values['UserName'];
        WorkflowDM.SetUp(CurrentUser);
        lblCurrentUser.Caption:= WorkflowDM.GetCurrentUserName;
      end;
    end;

    What am I doing wrong here.

×
×
  • Create New...