Sets a flag that will show a bottom border for an item with the specified text.
        :param item_text: the text property of the item
        :param flag: boolean specifying if the border should be shown.
426948
def show_item_bottom_border(self, item_text, flag):
        
        if flag:
            self.__bottom_border_dict[item_text] = True
        else:
            self.__bottom_border_dict.pop(item_text, None)
195187
def option(flag, text, scope=nil)
      Runner.instance.add_option flag, text, scope
    end
562069
def text(self, text):
        
        tc = self._tc
        tc.clear_content()
        p = tc.add_p()
        r = p.add_r()
        r.text = text
703464
def itemFromTag( self, tag ):
        
        for row in range(self.count() - 1):
            item = self.item(row)
            if ( item and item.text() == tag ):
                return item
        return None
1308074
function(container, item) {        
            var borderTop = parseFloat(container.css('borderTopWidth')) || 0,
            paddingTop = parseFloat(container.css('paddingTop')) || 0,
            offset = item.offset().top - container.offset().top - borderTop - paddingTop,
            scroll = container.scrollTop(),
            elementHeight = container.height(),
            itemHeight = item.outerHeight(true);

            if(offset < 0) {
                container.scrollTop(scroll + offset);
            }
            else if((offset + itemHeight) > elementHeight) {
                container.scrollTop(scroll + offset - elementHeight + itemHeight);
            }
        }
76056
public void setText (String text)
    {
        if (_label.setText(text)) {
            _dirty = true;
            // clear out our constrained size where appropriate
            if (_constrain == HORIZONTAL || _constrain == VERTICAL) {
                _constrainedSize = 0;
                _label.clearTargetDimens();
            }
            revalidate();
            repaint();
        }
    }
496665
def with_text(self, text, markdown=None):
        '''
        '''
        self._text = text
        self._markdown = markdown or False

        return self
1192739
def set_text(self, text):
        '''

        '''
        self.traj_controls.timelabel.setText(self.traj_controls._label_tmp.format(text))
525701
def render(self, flags: Flags) -> Text:
        
        return random.choice(self.best_for_flags(flags)).value
232777
def add_option(flag, text, scope=nil)
      scope or scope = 'Options'
      @options[scope] ||= {}
      @options[scope][flag] = text
    end
1075427
def create_image_menu_item(self, text, image_name):
        
        menu_item = Gtk.ImageMenuItem(text)
        img = self.create_image(image_name)
        menu_item.set_image(img)
        return menu_item
1334641
def setText(self, text):
        
        self._text = text
        
        # update the label
        btn = self.widget()
        if btn:
            btn.setText(text)
674819
def set_item_data(self, item, filename, line_number):
        """"""
        set_item_user_text(item, '%s%s%d' % (filename, self.SEP, line_number))
1202280
def banner(text, border='=', width=80):
    
    text_padding = '{0:^%d}' % (width)
    LOG.info(border * width)
    LOG.info(text_padding.format(text))
    LOG.info(border * width)
780490
def _ewp_flags_set(self, ewp_dic_subset, project_dic, flag_type, flag_dic):
        
        try:
            if flag_type in project_dic['misc'].keys():
                # enable commands
                index_option = self._get_option(ewp_dic_subset, flag_dic['enable'])
                self._set_option(ewp_dic_subset[index_option], '1')

                index_option = self._get_option(ewp_dic_subset, flag_dic['set'])
                if type(ewp_dic_subset[index_option]['state']) != list:
                    # if it's string, only one state
                    previous_state = ewp_dic_subset[index_option]['state']
                    ewp_dic_subset[index_option]['state'] = []
                    ewp_dic_subset[index_option]['state'].append(previous_state)

                for item in project_dic['misc'][flag_type]:
                    ewp_dic_subset[index_option]['state'].append(item)
        except KeyError:
            return
1237235
def item_at_line(root_item, line):
    
    previous_item = root_item
    item = root_item
    for item in get_item_children(root_item):
        if item.line > line:
            return previous_item
        previous_item = item
    else:
        return item
520012
public Message setFlag(Flag ... flags) {
        if(flags != null) {
            short tmp=this.flags;
            for(Flag flag : flags) {
                if(flag != null)
                    tmp|=flag.value();
            }
            this.flags=tmp;
        }
        return this;
    }