Jump to content

lxpbuaa

uniGUI Subscriber
  • Posts

    62
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by lxpbuaa

  1. 7 minutes ago, Sherzod said:

    Hi,

    Can you try this ?

    
    procedure TMainForm.UniFormCreate(Sender: TObject);
    begin
      UniButton1.JSInterface.JSConfig('iconCls', ['di-add']);
    end;

    Hi, 

    JSConfig ('iconCls') can show the icon ,  but the  iconAlign property becomes invlid (always "x-btn-icon-left")

     

     

  2. 28 minutes ago, GerhardV said:

    Hi there - if you have purchased my theme pack you can look in the following folder:

    ..FMSoft\Framework\uniGUI\unipackages-6.5.3\themes\css

    There you will find the CSS files for the themes, for example the uni-xtheme-uni_bootstrap.css, inside of that file search for the comment "/* Button font sizes */", where the button font sizes are set. You can also override any other components font by adding to that file. To find the CSS class you right click on the component in Chrome and select "Inspect" from the popup menu. Which will open the developer tools from where you can locate the correct classes and much more.

    Thanks very much! Yes, I has purchased your theme pack.

  3. Hi Sherzod,

    .x-panel-body-default only effects label, and  .x-form-text-default only effects edit, combox ect. Others such as menu, button, grid, treeview, pagecontrol, panel.title, form.caption, don't change their fontsize.

    I set *{font-size:12px} , it can effects many components, but not contains button, grid.pagebar, panle.title, tabsheet.title ect.

    How to change default fontsize with all components?  Or, how to get their css style classnames, so I can set these css classes one by one . Thanks!   (uni-1.50.0.1480)

  4. Hi,

    The default fontsize of classic theme is 11px. In IE 9, the font is smaller,  and Chrome is normal.

    How can I change the default fontsize of classic theme from 11px to 12px。 On 12px, IE and Chrome text is  same size.

    I replace all 11px to 12px in  uni-xtheme-uni_classic.css、ext-theme-uni_classic-all_1.css、ext-theme-uni_classic-all_2.css、ext-theme-uni_classic-all-rtl_1.css、ext-theme-uni_classic-all-rtl_2.css(unipackages-6.5.3) and uni-xtheme-classic.css(uni-1.50.0.1480), but nothing changed.

     

    TIM图片20181007012111.png

  5. HI,

    I need a monthpicker, can I modify the uniDateTimePicker to achieve this demand?

    Or use the ExtJS component monthpicker, but, how can I insert the component into uniGUI application?

    Ext.create({
        xtype: 'monthpicker',
        renderTo: document.body,
        value: new Date(),
        onSelect: function() {
            Ext.Msg.alert('Selected', this.getValue());
        },
        listeners: {
            okclick: 'onSelect',
            monthdblclick: 'onSelect',
            yeardblclick: 'onSelect',
            cancelclick: function () {
                this.setValue(new Date());
            }
        }
    });

  6. I asked myself:

    1. FireDAC deals all date/time field as SQLTimeStamp field, and uniDateTimePicker ignores the prolem.   To solve this prolem as:

     FConnection.FormatOptions.OwnMapRules := True;
      with FConnection.FormatOptions.MapRules.Add do
      begin
        SourceDataType := dtDateTimeStamp;
        TargetDataType := dtDateTime;
      end;

    2. Another prolem, uniDateTimePicker raises "xxxx-xx-xx" is not valid date time. uniDBGrid.pas has codes as below:

    SetFldValue……

    D := StrToDateTime(AVal, FmtSettings);  --FmtSettings is   a new global var in uniGUIApplication, why don't use SysUtils.FormatSettings? Change values of FmtSettings and the prolem solved.

  7. Hi,

    I uses a uniDateTimePicker to edit a datetime column of a DBGrid. The field type is TSQLTimeStampField.

    There are 2 problems:
    1. When enter the editor and leave it, the date (e.g "2018-01-11") always changes to a GMT datetime text.  

    2. Atfer change the date value, the error "Could not parse SQL TimeStamp string" raises.

    Thanks!

     

     

    TIM图片20180917195528.png

  8. Hi,

    I create a combobox at runtime, and insert into DBGird.pagingBar:

     FComboPageSize := TUniComboBox.Create(Self.Owner);
        FComboPageSize.Items.Add('每页25条');
        FComboPageSize.Items.Add('每页50条');
        FComboPageSize.Items.Add('每页100条');
        FComboPageSize.Items.Add('每页200条');
        FComboPageSize.Style := csDropDownList;
        FComboPageSize.ItemIndex := 0;
        FComboPageSize.OnChange := DoCombPageSizeChange;

    procedure TdlzUniDBGrid.DoOnAfterLoad;
    begin
      if WebOptions.Paged then
        JSInterface.JSCall('pagingBar.insert', [1, FComboPageSize.JSControl]);
      inherited;
    end;

    FComboPageSize.ItemIndex always equals 0, why, thanks!

    procedure TdlzUniDBGrid.DoCombPageSizeChange(Sender: TObject);
    begin
      if WebOptions.Paged then
        WebOptions.PageSize := Round(25 * Power(2, FComboPageSize.ItemIndex));
    end;

     

     

  9. 1 hour ago, Sherzod said:

    Hi,

    You can simple use the ReadOnly property for this

    UniDBGrid1.Columns[0].ReadOnly := True/False; for example

    Thanks for your answer. Yes, column.ReadOnly or Editor.Enabled can controls the column editable  or not.

    But , i need know the time point to set readonly or enabled.  If i set readonly/enabled in the method BeforeCellEdit the editor's state changes from enabled to not enabled in the UI,  user experiences are terrible. Exists a earlier method before BeforeCellEdit ?

  10. Hi, I need set dbgrid.column editable or not at runtime, and two ways are currently found, but there are still problems.

    1. Overrid dbgrid.BeforeCellEdit method,  change Column.Editor.Enabled.    But the editor's state changes from enabled to not enabled in the UI,  user experiences are terrible.

    2. Set Column.Editor.OnEnter, in the event set editor.Enabled.  If i create the ediotrs at design, it's ok, bu at runtime, the OnEnter event don't fires.

    Is there any other way?

    Can you help me? Thanks!

  11. Oh, sorry ,unfortunately, the memo created at  runtime  doesnt work.

     

    UniMemo1 is ok, but Memo doesnt work.  Can you help me?

     

    procedure TMainForm.UniFormCreate(Sender: TObject);
    const
      KeyDownText = 'function keydown(sender, e, eOpts) {if (e.getKey() == e.ENTER) {e.stopPropagation()}}';
    var
      Memo: TUniMemo;
    begin
      Memo := TUniMemo.Create(self);
      Memo.Parent := self;
      Memo.Left := 50;
      Memo.ClientEvents.ExtEvents.Values['keydown'] :=  KeyDownText;
      UniMemo1.ClientEvents.ExtEvents.Values['keydown'] :=  KeyDownText;
    end;
     
  12. Hi,

     

     

    Maybe this will help you:

    http://forums.unigui.com/index.php?/topic/6194-navigatekeys-unimemo/&do=findComment&comment=31702

     

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

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

    Best regards.

     

    HI, I can't set the clienevent at runtime? Because the Memo editor is created dynamicly.

     

    e.g.

      TUniMemo(Editor).ClientEvents.ExtEvents.Add
        ('keydown=function keydown(sender, e, eOpts) {if (e.getKey()== e.ENTER) {e.stopPropagation();}}');
  13. At runtime,  change Form.NavigateKeys.Enabled or Form.NavigateKeys.Nex.Key,  it doesnt work.  

     

    e.g.

     

    procedure TEditDataForm.OnMemoEnter(Sender: TObject);
    begin
      NavigateKeys.Next.Key := 0;
      NavigateKeys.Enabled := False;
    end;
     
    procedure TEditDataForm.OnMemoExit(Sender: TObject);
    begin
      NavigateKeys.Next.Key := 13;
      NavigateKeys.Enabled := True;
    end;
     
    It means when the focus is in Memo editor, I can enter RETURN key as a line feed.
    How can I do it?
    Thanks!
     

     

×
×
  • Create New...