Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Dec 10, 2009 05:58
open dhtmlx forum
I want to modify the height of one of textearea ? What's method use for this ? ...

I want to modify the height of one of textearea ? What's method use for this ?
Answer posted by Alex (support) on Dec 10, 2009 06:23
what textarea and component do you mean ?
Answer posted on Dec 10, 2009 06:37
I'm two textarea in my forms and i want to modify the height of class dhx_cal_ltext only for one textarea.
Answer posted by Alex (support) on Dec 10, 2009 06:55

Height can be set directly in the lightbox confiduration:

scheduler.config.lightbox.sections=[ 
  {name:"description", height:130, map_to:"text", type:"textarea" , focus:true},

..

}

Answer posted on Dec 10, 2009 07:01
i'm use tis method but doesn't works i want to make 0px for the class dhx_class_ltext only for some user
Answer posted by Alex (support) on Dec 10, 2009 07:37
You can redefine scheduler.config.lightbox.sections when it is necessary. You can set different height here depending on user
Answer posted on Dec 10, 2009 07:49
it's possible to make in the class css display="none" for the class dhx_cal_ltext only for one textarea ?
Answer posted by Alex (support) on Dec 10, 2009 08:23

You can redefine the render method of the textarea block as you need. 

The original method is:

scheduler.form_blocks.textarea.render = function(sns){
  var height=(sns.height||"130")+"px";
  return "<div class='dhx_cal_ltext' style='height:"+height+";'><textarea></textarea></div>";
}

Please, see details here http://dhtmlx.com/dhxdocs/doku.php?id=dhtmlxscheduler:custom_details_form


Answer posted on Dec 10, 2009 08:41
This method doesn't works on my scheduler. I want to make display style none for my textarea.
Answer posted on Dec 11, 2009 03:18
up
Answer posted by Alex (support) on Dec 11, 2009 04:41

Hello,

>> I want to make display style none for my textarea.

in this case you can try to add display:none property to the textarea tag:

scheduler.form_blocks.textarea.render = function(sns){

  var height=(sns.height||"130")+"px";
  return "<div class='dhx_cal_ltext' style='height:"+height+";'><textarea style="display:none"></textarea></div>";
}

Answer posted on Dec 11, 2009 04:58
Which file because in the function init of index. This method doesn't works.
Answer posted by Alex (support) on Dec 11, 2009 05:03

Sorry for the misleading information:

scheduler.form_blocks.textarea.render = function(sns){

  var height=(sns.height||"130")+"px";
  return "<div class='dhx_cal_ltext' style='height:"+height+";'><textarea style=\"display:none\"></textarea></div>";
}
scheduler.form_blocks.textarea.focus = function(){}

Answer posted on Dec 11, 2009 05:12
thank you but i want to apply this method for the first textarea. I have two textarea.
Answer posted by Alex (support) on Dec 11, 2009 06:01

In this case you create a new block that is based of existent  - "textarea"

scheduler.form_blocks.textareaDis={
  render:function(sns){
  var height=(sns.height||"130")+"px";
  return "<div class='dhx_cal_ltext' style='height:"+height+";'><textarea style=\"display:none\"></textarea></div>";
  },
  set_value:function(node,value,ev){
  node.firstChild.value=value||"";
  },
  get_value:function(node,ev){
  return node.firstChild.value;
  },
 focus:function(node){
  
  }
 }

Answer posted on Dec 11, 2009 06:14
Thank you for your help i'm used other method. Thanks