标签: cell

Excel走来走去

如果你有一个单元格的参考,有没有办法在Excel表格中走动?像这样

Microsoft.Office.Interop.Excel.Range cellWalker = mfe.GetMyCell(Mysheet);

cellWalker = cellWalker.GoUpOneRowButKeepColumn();
cellWalker = cellWalker.GoDownOneRowButKeepColumn();
cellWalker = cellWalker.GoLeftOneColumnButKeepRow();
cellWalker = cellWalker.GoRightOneColumnButKeepRow();
Run Code Online (Sandbox Code Playgroud)

关心斯特凡

c# wpf excel move cell

1
推荐指数
1
解决办法
2593
查看次数

动态更改tableview单元格中自定义标签的值

我在我正在使用的tableview单元格中使用自定义标签.我需要根据某些参数动态增加和减少tableview单元格(标签)的高度.我怎样才能做到这一点.

iphone label cell uitableview ios

1
推荐指数
1
解决办法
589
查看次数

JSF数据表单元格 - 如果内容太长,则剪切文本并替换为"..."

如果单元格太长并且在末尾添加三个"......"(没有包装),我想剪切文本.问题是,我不能在XX符号之后删除java中的内容,因为'i'占用的空间比'W'少,后者反过来看起来很傻.

如何使用CSS/java实现此目标(如果可能,不使用Java脚本)?或者那是不可能的?

谢谢!

css java datatable jsf cell

1
推荐指数
1
解决办法
1452
查看次数

UItableview单元格混乱(再次)

基本上我有这个UItableview,生成时由2个单元组成:一个有分数,如果你触摸另一个,它会插入另一行分数.所有这一切都很好但是当我滚动并且第一个单元格离开屏幕时,当它返回时它会在它上面添加另一个(它叠加它)!我想我做错了什么与dequeueReusableCellWithIdentifieraddSubview,但我无法弄清楚它是什么?

这是我的代码:

(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    int feedIndex = [indexPath indexAtPosition:[indexPath length] - 1];
    static NSString *CellIdentifier1 = @"Cell1";
    static NSString *CellIdentifier2 = @"Cell2";


    if (feedIndex == 0)// configures the first cell

    {

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier1 forIndexPath:indexPath];

        if (cell == nil) {
            cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier1];

    textField1 = [[UITextField alloc] initWithFrame:CGRectMake(0, (44 - 15) / 2.0, 80, 15)];
    textField1.font = [UIFont boldSystemFontOfSize:15];
        textField1.tag = i+1;// to keep track of the …
Run Code Online (Sandbox Code Playgroud)

cell uitableview

1
推荐指数
1
解决办法
220
查看次数

单元格数组中的空格

我正在使用textscan来读取文本文件,我得到<55x1 cell>示例:

 'aa a aa'
 'a  aaaa a'
 'a =  aaaaa'
 'aaaaaa'
 ' a a a aaa'
 'aa'
 'aaa'
 'aaaa'
  .
  . 
  .
  .
Run Code Online (Sandbox Code Playgroud)

我想删除每个刺痛中的空白区域如果我有刺痛

 string = 'I am 24 Years    old'
Run Code Online (Sandbox Code Playgroud)

而我用

  string(ismember(string,' ')) = [];
Run Code Online (Sandbox Code Playgroud)

它将消除空间,我会得到

 'Iam24Yearsold'
Run Code Online (Sandbox Code Playgroud)

但由于细胞不起作用或者我不知道该怎么做它我该怎么做?有什么建议吗?

matlab whitespace cell

1
推荐指数
1
解决办法
4094
查看次数

如何在两个单元阵列上进行右阵分割

我有两个单元格数组:A = {<16x1 double>,<37x1 double>,<43x1 double>}和B = {<16x1 double>,<37x1 double>,<43x1 double>}.现在,我想用单元格数组B的相应元素划分单元格数组A的每个元素,反之亦然!如果单元阵列B的元素大于单元阵列A的元素,则该偏差应为B./A,然后计算这些值的平方根.对于Two矩阵,我知道我可以简单地编写以下代码:

if(a > b )
 ratio= sqrt(a ./ b);
else
 ratio= sqrt(b ./ a);   
end
Run Code Online (Sandbox Code Playgroud)

但我不知道如何扩展此算法的单元格数组?我知道我可以定义两个for循环来访问单元格数组的每个向量,然后应用我的上面的代码,但是这个算法太慢了,因为我编写了像我提到的代码,所以它对大单元格数组没有用.看到它真的糟透了!THX为您提供帮助

arrays matlab cell

1
推荐指数
1
解决办法
316
查看次数

如何从cellForRowAtIndexPath更改行高?

我需要使用UITableView 更改cellForRowAtIndexPath中的行高.

heightForRowAtIndexPath在cellForRowAtIndexPath之前执行,但在cellForRowAtIndexPath中我将内容设置为行,取决于必须重新计算的高度.

height row cell uitableview swift

1
推荐指数
1
解决办法
3380
查看次数

使一个CollectionViewCell在Swift中突出显示

在过去的几个小时里,我试图完成以下任务:

在UICollectionview中,当我突出显示(向下触摸)一个单元格时,我希望它向内反射几个像素(更小的尺寸)并在释放时弹回到原始大小.

这是我到目前为止所尝试的:

override func collectionView(collectionView: UICollectionView,
didHighlightItemAtIndexPath indexPath: NSIndexPath) {


    collectionView.collectionViewLayout.invalidateLayout()
    let cell = collectionView.cellForItemAtIndexPath(indexPath)
    UIView.transitionWithView(cell!, duration: 1, options: UIViewAnimationOptions.CurveEaseIn, animations: {

        let center = cell?.center
        let frame2 = CGRect(x: 0, y: 0, width: 50, height: 50)
        cell?.frame = frame2
        cell?.center = center!

        }, completion: nil)
}
Run Code Online (Sandbox Code Playgroud)

(我从这个问题中找到了很多代码示例: UICollectionView:选择时动画单元格大小会发生变化,但这适用于单元格选择.不突出显示.)

所以在didHighlightItemAtIndexPath中我将突出显示的单元格设置为新的大小.大小设置正确但出现以下问题:1:它没有动画,2:它移动到位置(0,0)并动画回到中心位置.它根本不应该移动位置 - 只是尺寸.

我在Shazam应用程序中看到了这个效果以供参考.当您在歌曲名称下方的按钮上对一首歌曲进行shazam(或查看以前的shazamed歌曲)时,可以看到它.

collections view cell jquery-animate swift

1
推荐指数
1
解决办法
2601
查看次数

CollectionView添加额外的单元格"添加更多"

我有一个问题是在我的集合视图中添加额外的单元格我已经更改了逻辑以使用数据模型来填充我的单元格

 func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
        return pictures.count + 1
    }


    func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {

        let cell = collectionView.dequeueReusableCellWithReuseIdentifier("images", forIndexPath: indexPath) as! ProfileImageCell

        let picture = pictures[indexPath.item] as! Gallery

        print(indexPath.item)

        if indexPath.item == pictures.count {
            cell.image.image = UIImage(named: "ProfilePlusImage")
        } else {
            cell.image.sd_setImageWithURL(NSURL(string: picture.fileUrl), placeholderImage: UIImage(named: "Placeholder"))
            cell.imageId = picture.id.integerValue
        }

        return cell
    }
Run Code Online (Sandbox Code Playgroud)

我想这个问题就在这一行

让picture = pictures [indexPath.item]为!画廊

当我标记并标记时

cell.image.sd_setImageWithURL(NSURL(string:picture.fileUrl),placeholderImage:UIImage(named:"placeholder"))

它在第11位增加了额外的细胞.但是其他方式让我超越了界限

谁能帮助我?

cell ios uicollectionview uicollectionviewcell swift

1
推荐指数
1
解决办法
1483
查看次数

在swift 3中的tableView中按下了哪个单元格按钮

我已经阅读了类似这样的问题,但这些代码对我没有用,所以请帮助:我有一个表格视图,每个单元格中有一些按钮 - 这个表视图是用户的因素,我添加了按钮到该tableview - 当用户有付费的钱按钮隐藏在那个单元格中的那个因素中,另一个单元格中隐藏另一个因素当用户没有支付付款时没有隐藏 - 这就是我想要检测哪些单元格按钮按下了?!我知道在表视图中我们可以检测到哪个单元格已被按下但是这是不同的,因为用户只需按下该单元格中的按钮不按下所有单元格

由于我的代码太长,我只需将表格视图代码放在这里

public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell
{
    let cell = tableView.dequeueReusableCell(withIdentifier: "factorCell", for: indexPath) as! FactorCell

    cell.factorTitle.text = factorTitle[indexPath.row]
    cell.factorCode.text = factorCodes[indexPath.row]
    cell.factorDate.text = factorDate[indexPath.row]
    cell.factorHour.text = factorHour[indexPath.row]
    cell.factorPrice.text = factorPrice[indexPath.row]
    cell.factorCondition.text = factorConditions[indexPath.row]
    cell.factorBill.tag = indexPath.row
 cell.factorBill.addTarget(self,action:#selector(factorViewController.Bill), for: UIControlEvents.touchUpInside)

    cell.factorDetail.tag = indexPath.row    

    cell.factorDetail.addTarget(self,action:#selector(factorViewController.FactorDetail), for: .touchUpInside)


    if   factorConditions[indexPath.row] == "?????? ???"  {


        cell.factorBill.isHidden = true


    } else {

        cell.factorCondition.textColor = UIColor.red

        cell.factorBill.isHidden = false

    }


    return cell

} …
Run Code Online (Sandbox Code Playgroud)

cell uibutton uitableview ios swift3

1
推荐指数
1
解决办法
4142
查看次数