Jump to content

pro_imaj

uniGUI Subscriber
  • Posts

    929
  • Joined

  • Last visited

  • Days Won

    5

Posts posted by pro_imaj

  1. 8 hours ago, Darth Florus said:

    Hi Pal:

    Use InsertComponent Method or InsertControl instead of change the parent property.

    When FfrmPopup is a TUniForm:

    Example 1:

      { Crear un origen de datos }
      FdsPopLista := TDataSource.Create(FfrmPopup);
      FfrmPopup.InsertComponent(FdsPopLista);

    Example 2:

      { Crear una grilla }
      FdbgPopLista := TUniDBGrid.Create(FfrmPopup);
      FdbgPopLista.Align := alClient;
      FfrmPopup.InsertControl(FdbgPopLista);

    Best Regards

     

    @Darth Florus HiThanks for the answer,

    I couldn't adapt it to the code I wrote above, could you please give the example accordingly.

    procedure TFShowModal.UniFormBeforeShow(Sender: TObject);
    var
      FCurrentFrame: TUniFrame;
    begin
    
      FCurrentFrame := TUniFrameClass(FrameAd).Create(Self);
      FCurrentFrame.Align := alClient;
      FCurrentFrame.Parent := UniTabSheet1;
    
      Refresh;
    
    end;
  2. Hi,

    I'm calling Frame inside a UniPageControl inside a form.
    When I press the tab key in the uniedits in the frame I call, the next edit is not positioned.

    I have tried almost every way but the result is negative.

    When I add uniedits on UnipageControl and compile it, when I press the tab key, it is positioned to the other uniedit.

    Why can this be a problem with the edits inside the frame.

    I am creating Frame in Unipagecontrol as below.

     

    procedure TFShowModal.UniFormBeforeShow(Sender: TObject);
    var
      FCurrentFrame: TUniFrame;
    begin
    
      FCurrentFrame := TUniFrameClass(FrameAd).Create(Self);
      FCurrentFrame.Align := alClient;
      FCurrentFrame.Parent := UniTabSheet1;
    
      Refresh;
    
    end;

     

  3. On 8/13/2022 at 9:42 AM, Sherzod said:

    Hello,

    Let's try this solution first.
    As I see it, not all themes are the same in this regard. Some themes don't have border-color, and some have it closer to white. Or need to take the value of another class, please also analyze. And therefore, there may not be a universal solution.

    Solution:

    1. MainForm.Script ->

    var _themeCSS = Ext.util.CSS.getRule('.x-form-trigger-wrap-default.x-form-trigger-wrap-focus');
    if (_themeCSS) {
        var _themeColor = _themeCSS.style['border-color'];
    }

    2. UniEdit.ClientEvents.UniEvents ->

    function afterCreate(sender)
    {
        sender.on('focus', function(){if (_themeColor) {this.labelTextEl.setStyle('color', _themeColor)}});
        sender.on('blur', function(){this.labelTextEl.setStyle('color', '')});
    }

    image.png.59e94e736af0e60f6d44982ea8a4753b.png

    Hi,

    @Sherzod The solution you wrote works perfectly, thank you very much.

  4. 5 hours ago, Sherzod said:

    Hello, 

    Do you mean FieldLabel font color?

    No, I already know that.
    What I want to tell is; When the cursor is positioned in Edit, the user understands that the cursor is there with a color. Can this color be brought around the FieldTex part as well?

    *Color changes according to the theme. In the attached picture, there is a yellow color according to the aria theme, I want this color to be in the fieldtext so that the user can understand which field is filling.

  5. On 8/5/2022 at 7:03 PM, Hayri ASLAN said:

    What settings are you changing?

     

    I couldn't find out which setting has changed for now, but when I make the same settings with other projects, it doesn't work. I made a new mainmodule settings, and for now I solved the problem by not making the old settings.

    Thank you for your interest, Mr. Hayri.

    As always, I would like to express my gratitude to all concerned.

  6. 6 minutes ago, Hayri ASLAN said:

    Merhaba

    OnControlPanelLogin olayının servermodule'de atandığından emin olun.

    İçinde herhangi bir kodunuz olmasa bile, giriş sayfası görünecektir.

     

    image.thumb.png.00f1e226d6f0d05136ed830f3b247508.png

    I coded it exactly as you said. But again it didn't. unfortunately. Unfortunately, I solved them by creating a new project and copying the mainmodule and servermodule in the new project.

    Thank you.

  7. 59 minutes ago, pro_imaj said:

    Hi,

    I want to login with username and password in /server section.

    Username is logged in without asking for password even though I have added the code below, is there any need for another setting?

     

    procedure TUniServerModule.UniGUIServerModuleControlPanelLogin
      (ASession: TUniGUISession; const AUser, APassword: string;
      var LoginValid: Boolean; LoginAttempt: Integer);
    begin
      if SameText(AUser, 'demo') and SameText(APassword, 'demo') then
        LoginValid := True
      else
      begin
        if LoginAttempt = 3 then
          ASession.Terminate('Error!');
      end;
    end;

     

    I copied the servermodule in a previously working project to the project, but the result is negative.

    So the screen comes directly without asking for a password, this little problem drove me crazy. :(

  8. Hi,

    I want to login with username and password in /server section.

    Username is logged in without asking for password even though I have added the code below, is there any need for another setting?

     

    procedure TUniServerModule.UniGUIServerModuleControlPanelLogin
      (ASession: TUniGUISession; const AUser, APassword: string;
      var LoginValid: Boolean; LoginAttempt: Integer);
    begin
      if SameText(AUser, 'demo') and SameText(APassword, 'demo') then
        LoginValid := True
      else
      begin
        if LoginAttempt = 3 then
          ASession.Terminate('Error!');
      end;
    end;

     

×
×
  • Create New...