Jump to content


Photo

UniButtonEdit

triggerfield

  • Please log in to reply
17 replies to this topic

#1 Stas

Stas

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 176 posts
  • LocationKiev Ukraine

Posted 19 October 2013 - 01:11 PM

Simple ext.form.triggerfield unigui wrapper

Attached Files


  • 2

#2 Fenix

Fenix

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 258 posts
  • LocationBrazil

Posted 19 October 2013 - 05:45 PM

Hi Stas,
 
Thanks for sharing.
Grateful.

  • 0
Delphi Berlin
uniGui 1.0.0.1410
Windows Server 2012 64bit IIS

#3 Renato Henrique

Renato Henrique

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 04 February 2014 - 08:00 PM

Does not work in version 1024

does anyone know why....


  • 0

#4 David Oliveira

David Oliveira

    Active Member

  • uniGUI Subscriber
  • PipPipPip
  • 61 posts

Posted 04 June 2014 - 02:00 PM

does not work in version 0.95.0.1046, and now batman? ;)


  • 0

#5 Stas

Stas

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 176 posts
  • LocationKiev Ukraine

Posted 05 June 2014 - 05:28 AM

OK

 

Attached Files


  • 0

#6 Renato Henrique

Renato Henrique

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 05 June 2014 - 11:51 PM

Grateful.


  • 0

#7 rfssilvasp

rfssilvasp

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 12 August 2014 - 04:26 PM

Hi !

 

When I try install, the component cannnot load TUnistring ?

 

Did anybody get install ?

 

Thanks


  • 0

#8 NelsonFS

NelsonFS

    Active Member

  • uniGUI Subscriber
  • PipPipPip
  • 86 posts

Posted 27 August 2014 - 11:59 AM

When click in ExtEvents to open, appears message error:

 

[Window Title]
DbGrid1 - Delphi XE6 - Main [Built]
[Content]
Resource EXTJS_EXT_FORM_TRIGGERFIELD not found
[OK]

 

How to fix??
 


  • 0

#9 Stas

Stas

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 176 posts
  • LocationKiev Ukraine

Posted 28 August 2014 - 06:47 AM

Replace In 
procedure TUniButtonEdit.ConfigJSClasses(ALoading: Boolean);
from 
  JSObjects.DefaultJSClassName:='Ext.form.TriggerField';
 
to
 
  JSObjects.DefaultJSClassName:='Ext.form.field.Trigger';

 

 

 


  • 1

#10 NelsonFS

NelsonFS

    Active Member

  • uniGUI Subscriber
  • PipPipPip
  • 86 posts

Posted 28 August 2014 - 10:58 AM

 

Replace In 
procedure TUniButtonEdit.ConfigJSClasses(ALoading: Boolean);
from 
  JSObjects.DefaultJSClassName:='Ext.form.TriggerField';
 
to
 
  JSObjects.DefaultJSClassName:='Ext.form.field.Trigger';

 

 

 

 

 

Works fine!!

Thank you Stas!


  • 0

#11 logisticasoft

logisticasoft

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 204 posts

Posted 02 March 2015 - 03:33 PM

Simple ext.form.triggerfield unigui wrapper

Hi Stas,
 
Thanks for sharing.
Grateful.
 

You might call this component to a form ? When you press the button , do a ShowModal a way , I tried but I failed to show how

 

I appreciate the support you can give me

 

 

code:

unit UniButtonEdit;
 
interface
uses SysUtils,Classes,uniGuiTypes, uniGUIClasses,UniEdit
, uniGUIForm , uniGUIAbstractClasses, uniGUIApplication ,
  uniGUIBaseClasses , controls
;
type
   TIconCls = (action, add, arrow_up, arrow_right, arrow_down, arrow_left, bookmarks, compose, delete, download, favorites, info, more, refresh, reply, search, settings, star, team, time, trash, user);
 
Type
  TUniButtonEdit = class(TUniEdit)
  private
    FOnButtonClick: TNotifyEvent;
    FIconCls: String;
    procedure SetIconCls(const Value: String);
    function GetTriggerCls: String;
    procedure ShowForma;
  protected
    procedure DOHandleEvent(EventName: string; Params: TUniStrings); override;
    procedure ConfigJSClasses(ALoading: Boolean); override;
    procedure LoadCompleted; override;
    procedure Click ; override;    // CRAMIREZ
  public
    constructor Create(AOwner:TComponent); override;
  published
 
     property OnButtonClick:TNotifyEvent read FOnButtonClick write FOnButtonClick;
      property IconCls:String read FIconCls write SetIconCls;
      property triggerCls:String read GetTriggerCls;
 
 
  End;
 
procedure Register;
 
implementation
   uses UniButtonForm ;    // CRAMIREZ
 
 
procedure Register;
begin
  RegisterComponents('uniGUI Custom', [TUniButtonEdit]);
end;
 
{ TUniButtonEdit }
 
function TUniButtonEdit.GetTriggerCls: String;
begin
 if FIconCls<>'' then
 Result:='x-form-'+FIconCls+'-trigger'
 else
 Result:='';
 
 
 
end;
 
 
procedure TUniButtonEdit.ConfigJSClasses(ALoading: Boolean);
begin
  inherited;
  JSObjects.DefaultJSClassName:='Ext.form.TriggerField';
 
 
end;
 
constructor TUniButtonEdit.Create(AOwner: TComponent);
begin
  inherited;
 FIconCls:='search';   //  <----- tipo de icono
 
end;
 
procedure TUniButtonEdit.Click;
begin
  inherited;
  ShowForma;     // CRAMIREZ
end;
 
 
procedure TUniButtonEdit.ShowForma;    // CRAMIREZ
VAR
  FUniButtonForm : TFUniButtonForm;
begin
   text:= 'YYYY';
   TFUniButtonForm.create(uniapplication);
  FUniButtonForm.SHOWMODAL(
   procedure(Sender: TComponent; Result: Integer)
   var
    i:Integer;
   begin
      // LOGIN OK
      if Result = mrOk then begin
      end ;
      if Result = mrcancel then begin
      end;
   end)
 
 
end;
 
procedure TUniButtonEdit.DOHandleEvent(EventName: string; Params: TUniStrings);
 
begin
 
if (EventName='buttonclick') then begin
 
 if Assigned(FOnButtonClick) then
   FOnButtonClick(Self);
 
end;
 
 inherited;
 
 
end;
 
procedure TUniButtonEdit.LoadCompleted;
begin
  inherited;
 
if WebMode then
begin
 if FIconCls<>'' then
 JSCode('triggerCls:"'+triggerCls+'"');
 JSCode('hideTrigger:false');
 JSAfterCreate(JSName+'.onTriggerClick=function(){ajaxRequest('+JSName+',"buttonclick",[]);};');
 
end;
end;
 
 
 
procedure TUniButtonEdit.SetIconCls(const Value: String);
begin
  FIconCls := Value;
end;
 
 
end.
 

 


  • 0

Carlos Ramirez

ramirez.carlos@yahoo.com


#12 NelsonFS

NelsonFS

    Active Member

  • uniGUI Subscriber
  • PipPipPip
  • 86 posts

Posted 14 October 2016 - 06:25 PM

Modified source to add UniButtonDBEdit.
UniButtonEdit + UniButtonDBEdit together in dpk project.
Compiled in Seattle upd1, but must run in previous versions.


  • 0

#13 ricardolb

ricardolb

    Active Member

  • uniGUI Subscriber
  • PipPipPip
  • 50 posts

Posted 20 October 2016 - 01:35 PM

Is there a way to add more than a button?


  • 0

#14 Freeman35

Freeman35

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 177 posts

Posted 24 October 2016 - 10:00 AM

Hello,

I tried to make in Trail 1321.

type
  TUnimButtonEdit = class(TUnimEdit)
  private

when show "TUnimForm", I get "Ajax error" Ext.form.field is undefined. 

How to use for mobile this component?

Thank you.


  • 0

#15 shawdown

shawdown

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 07 June 2017 - 12:08 PM

Link error bro.

Upload again?

 

 

Modified source to add UniButtonDBEdit.
UniButtonEdit + UniButtonDBEdit together in dpk project.
Compiled in Seattle upd1, but must run in previous versions.

 


  • 0

#16 NelsonFS

NelsonFS

    Active Member

  • uniGUI Subscriber
  • PipPipPip
  • 86 posts

Posted 07 June 2017 - 07:54 PM

https://mega.nz/#!2p...JzmNSD5N2JRO7Yo


  • 0

#17 tintinsoft

tintinsoft

    Newbie

  • Banned
  • Pip
  • 4 posts

Posted 02 July 2017 - 05:14 PM

delphi 10.2 + unigui V1-1397+Mobile, It raise error "  cannot read property "Trigger" of undefine


  • 0

#18 Rav

Rav

    Active Member

  • Members
  • PipPipPip
  • 87 posts

Posted 29 October 2017 - 09:38 PM

Setting the ReadOnly property to true makes the trigger buttons to disappear. Is there a workaround?


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users