Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

View Poll Results: you believe that the layout for the form.. would be differente?

Voters
19. You may not vote on this poll
  • yes

    13 68.42%
  • no

    6 31.58%
  1. #1
    Ext User fother's Avatar
    Join Date
    Sep 2007
    Location
    Brazil
    Posts
    744
    Vote Rating
    -1
    fother is an unknown quantity at this point

      0  

    Default TextField with Button

    TextField with Button


    Example
    Code:
    	public void onModuleLoad() {
    
    		FormPanel form = new FormPanel();
    
    		TextFieldWithButton<String> field = new TextFieldWithButton<String>(new Button("button"));
    		field.setFieldLabel("field");
    
    		TextField<String> t = new TextField<String>();
    		t.setFieldLabel("other field");
    
    		form.add(field);
    		form.add(t);
    
    		RootPanel.get().add(form);
    	}
    TextFieldWithButton
    Code:
    package example.client;
    
    import com.extjs.gxt.ui.client.GXT;
    import com.extjs.gxt.ui.client.core.El;
    import com.extjs.gxt.ui.client.widget.ComponentHelper;
    import com.extjs.gxt.ui.client.widget.button.Button;
    import com.extjs.gxt.ui.client.widget.form.TextField;
    import com.google.gwt.user.client.DOM;
    import com.google.gwt.user.client.Element;
    
    public class TextFieldWithButton<D> extends TextField<D> {
    
    	private El wrap;
    	private El input;
    	private final Button button;
    	private final int buttonOffset = 3;
    
    	public TextFieldWithButton(Button button) {
    		this.button = button;
    	}
    
    	@Override
    	protected void doAttachChildren() {
    		super.doAttachChildren();
    		ComponentHelper.doAttach(button);
    	}
    
    	@Override
    	protected void doDetachChildren() {
    		super.doDetachChildren();
    		ComponentHelper.doDetach(button);
    	}
    
    	@Override
    	protected El getInputEl() {
    		return input;
    	}
    
    	@Override
    	protected void onAttach() {
    		super.onAttach();
    		wrap.removeStyleName(fieldStyle);
    		if (GXT.isIE) {
    			int y1, y2;
    			if ((y1 = input.getY()) != (y2 = el().getParent().getY())) {
    				int dif = y2 - y1;
    				input.setTop(dif);
    			}
    		}
    	}
    
    	@Override
    	protected void onRender(Element target, int index) {
    		wrap = new El(DOM.createDiv());
    		wrap.addStyleName("x-form-field-wrap");
    		wrap.addStyleName("x-form-file-wrap");
    
    		input = new El(DOM.createInputText());
    		input.addStyleName(fieldStyle);
    		input.addStyleName("x-form-file-text");
    		input.setStyleAttribute("color", "#000000");
    
    		wrap.appendChild(input.dom);
    
    		setElement(wrap.dom, target, index);
    		super.onRender(target, index);
    
    		button.addStyleName("x-form-file-btn");
    		button.render(wrap.dom);
    
    		if (width == null) {
    			setWidth(150);
    		}
    	}
    
    	@Override
    	protected void onResize(int width, int height) {
    		super.onResize(width, height);
    		input.setWidth(wrap.getWidth() - button.el().getWidth() - buttonOffset);
    	}
    }
    Attached Images

  2. #2
    Ext User
    Join Date
    Oct 2009
    Posts
    1
    Vote Rating
    0
    cha0s1871 is on a distinguished road

      0  

    Default


    Thank you so much, this is so useful. I was gettin crazy to realize something like this, you saved me lots of time and blasphemies

  3. #3
    Sencha User
    Join Date
    Jul 2010
    Location
    Craiova, Romania
    Posts
    47
    Vote Rating
    0
    sempervivo is on a distinguished road

      0  

    Default thank you man

    thank you man


    I would to also thank you. God bless you!

  4. #4
    Sencha User
    Join Date
    Nov 2013
    Location
    Bangalore, India
    Posts
    97
    Vote Rating
    7
    vardhan22 is on a distinguished road

      0  

    Default Text Field with button

    Text Field with button


    How this can be achieved in GXT 3? I need something like MultiField or TextFieldWithButton

  5. #5
    Sencha User
    Join Date
    Nov 2013
    Location
    Bangalore, India
    Posts
    97
    Vote Rating
    7
    vardhan22 is on a distinguished road

      0  

    Default


    AdapterField does the work