Jump to content

PS1

uniGUI Subscriber
  • Posts

    95
  • Joined

  • Last visited

Everything posted by PS1

  1. No, i think you didn't understand me correctly, although this post will help me too. I want to create my own animation. Like you (in the post i quoted previously), but mobile versions dont have beforeClose js functions and i don't know how to code it in beforeHide js function (in mobile UNIGUI)
  2. Thanks for the response, but the last part : .customCh.x-big .x-checkboxfield .x-icon-el { width: 60px; height: 60px; } Does not seem to have any effect
  3. Can you please provide mobile version too?
  4. Any update on this ? I need a global option for changing text in the mask too.
  5. I can't, i need to make it universal so all forms could use it and i want to change code of it in runtime. Or maybe is it possible to run procedure(written in delphi) from javascript in ClientEvents, without using onAjaxEvent ? i need to call refresh function from it.
  6. Bingo ! Now it works, Thanks a lot !! But i have another problem i want to assign OnAjaxEvent to the _panel. But i don't want create this function in a class. I want to create it in another unit as simple procedure without any class. some thing like this: procedure CreateRefreshFunc(var _panel : TUnimPanel); var procedure Panel_AjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin //some code end; begin _panel.OnAjaxEvent := Panel_AjaxEvent; end; but i got error : Incompatible types: 'method pointer and regular proedure' in normal event like onClick (which has only 1 parameter(sender:TObject)) i could use: var ANotifyEvent : procedure of object; procedure Panel_OnClick(ASelf: TObject; Sender: TObject); begin //some code end; begin TMethod(ANotifyEvent).Code := @OnClick; TMethod(ANotifyEvent).Data := Pointer(_panel); _panel.OnClick := ANotifyEvent; end;
  7. To create part of ,,Refresh page" functionality in mobile pages(but i refresh only datasets) : In quick words i create bunch of listeners to get tap movement and show label(with is spinner icon). if user will swipe some distance i refresh page and hide this label. ,,Painted" function used instead of create in below code doesn't execute. _panel.ClientEvents.UniEvents.Values['afterCreate'] := 'function afterCreate(sender)' +'{' +' ' +' let clientY;' +' let start_top;' +' let new_top;' +' let can_start = true;' +' let is_at_top = true;' +' let curr_touch_move;' +' let label = '+_panel.Owner.Name+'.Labeltest;' +' function sleep (time) {' +' return new Promise((resolve) => setTimeout(resolve, time));' +' }; ' +' ' +' let scroller = sender.getScrollable();' +' if (scroller) {' +' scroller.on(''scroll'', function(a, b, c) {' +' if (c == 0) { is_at_top = true;console.log("is_at_top");}' +' else { is_at_top = false }' +' })' +' };' +' ' +' sender.el.addListener(''touchstart'', function(e) {' +' if (is_at_top) {' +' can_start = true;' +' start_top = sender.el.getTop();' +' clientY = e.touches[0].pageY;' +' label.setTop(-60);' +' } else {' +' can_start = false;' +' }' +' }); ' +' ' +' sender.el.addListener(''touchmove'', function(e) {' +' curr_touch_move = e.touches[0].pageY - clientY; ' +' if ((can_start) && (curr_touch_move > 0)) {' +' ' +' new_top = start_top+curr_touch_move; ' +' ' +' if ( label.getTop() < 50 ) {' +' label.setTop(-60 + curr_touch_move/1.5); ' +' }' +' }; ' +' });' +' ' +' sender.el.addListener(''touchend'', function(e) {' +' if ( label.getTop() >= 50 ) {' +' ' +' sleep(300).then(() => {' +' ajaxRequest(sender, "Refresh", []);' +' can_start = true;' +' }); ' +' ' +' } else {' +' label.setTop(-60);' +' }' +' }); ' +'}';
  8. Hey @Sherzod I have a similar problem. The differences are that i use component created dynamically in clientEvents of another component : var xLabel : TUnimLabel; begin xLabel := TUnimLabel.Create(Form); xLabel.Parent := _panel; xLabel.Caption := 'TTTTTTTTTTTTTTTTTTTT'; xLabel.LayoutConfig.Margin := '100 0 0 0'; xLabel.Left := 0; xLabel.top := 30; xLabel.Visible := True; xLabel.Name := 'Labeltest';//+inttostr(DateTimeToUnix(now)); _panel.ClientEvents.UniEvents.Values['afterCreate'] := 'function afterCreate(sender)' +'{' +' FormName.Labeltest.getTop();' <<------------ error here +'}'; In getTop() line i get : Cannot read properties of undefined (reading 'getTop'); if i add this label in design then it works. Can you help me ? I'm using: uniGUI Complete -Professional Edition Build 1.90.0.1568
  9. Hey @Sherzod, Sorry for my late response. Forgot to enable notification for this topic. Testcase is in attachment. CSS part is added in ServerModule->customCSS. test_case_checkBoxes.zip
  10. Hey @Sherzod i am also looking for the answer. I found global solution for all checkboxes by css: .x-checkboxfield .x-icon-el:before { font-size: 50px } .x-big .x-checkboxfield .x-icon-el:before { font-size: 50px; } But I want to set it only for some of them. I tried adding cls, but it doesn't work. Can you help ? .clsMyCheckBoxBig .x-checkboxfield .x-icon-el:before { font-size: 50px } .clsMyCheckBoxBig .x-big .x-checkboxfield .x-icon-el:before { font-size: 50px; } I'm using: uniGUI Complete -Professional Edition Build 1.90.0.1568
  11. It works ! Thanks for the fast response.
  12. What about mobile version of this. How can i do it with UnimFileUploadButton ? UniFileUploadButton1.JSInterface.JSCall('fileInputEl.dom.click', []);
  13. I'm using: uniGUI Complete -Professional Edition Build 1.90.0.1568
  14. @Hayri ASLANIn this topic from 2020 u said u gonna add mobile version of captcha. Is there any progress in building it? Is there temporary solution for mobile version of reCaptcha?
×
×
  • Create New...