如何获取关于superview的按钮坐标?(how to get coordinates of button with respect to superview?)
我的视图层次结构是
UIViewController.view
子视图(在半视图和底部的主视图上)
此子视图上的按钮
我希望得到关于我主视图的这个按钮的坐标
这个按钮的CGRect但是根据superview。
My view hierarchy is
UIViewController.view
a subview (on main view with half size and in bottom)
a button on this subview
I want to get the co-ordinates of this button with respect to my main view
the CGRect of this button but according to superview.
原文:https://stackoverflow.com/questions/17860770
更新时间:2023-05-14 12:05
最满意答案
FLID包含字符。 因此,您的参考需要在单引号内。
Me.Filter = "(([Flooring Products Query].FLID = '" & findByFLIDSearchBox & "'))"
FLID contains characters. Therefore, your reference needs to be inside a single quote.
Me.Filter = "(([Flooring Products Query].FLID = '" & findByFLIDSearchBox & "'))"
相关问答
更多-
电脑二级考试 是考access 还是VPF[2022-06-08]
access -
您需要正确的日期格式: strFilterNaklady = "[datNakladDatum] Between #" & Format(datRokMesiacOd, "yyyy\/mm\/dd") & "# And #" & Format(datRokMesiacDo, "yyyy\/mm\/dd") & "#" 此外,这可以简化为: datRokMesiacDo = DateSerial(Year(cmbStavK), Month(cmbStavK) + 1, 0) 'end Date You n ...
-
您将子表单记录源设置为日期...这不起作用。 您可以使用几种不同的方法。 像你的例子中的SQL就是其中之一。 但在这种情况下,我可能只是在您的子表单记录源上应用过滤器。 这是未经测试的,但它应该接近你想要的。 我唯一记不住的是,如果在表单过滤器中使用了Pounds(#),我知道它们在Access SQL和Expressions中被起诉,但表单过滤器有时会有所不同。 Private Sub cbSelectDate_AfterUpdate() Dim strFilter As String D ...
-
我现在就开始工作了。 为产品值分配过滤器的原始方法是将过滤器值直接分配给Products表单( Form_Products ) Form_Current事件中的Product Values表单( Form_ProductVals )。 这导致结果不一致。 现在我更改了代码以通过主Clients表单(包含Products和ProductVals子表单)分配过滤器值。 所以代码改为: Form_ProductVals.Form.Filter = "prod_id = " &
至 Form_C ... -
首先,看起来您使用的是子数据表。 它们与子表单有些不同(因为你不能命名它们,它们会自动为你命名)。 此外,由于您的按钮采用相同的形式,因此对于最顶层的形式,我们可以使用“me”关键字。 这将简化您的代码。 假设我们有3个嵌套子表单,我们可以使用以下语法: strName = Me.Swimmers_SubForm.Form![memb First Name] & " " & _ Me.Swimmers_SubForm.Form![memb Last Name] 以上将在第一个嵌套子表单 ...
-
MS Access 2010筛选器可重用子表单,基于父字段(MS Access 2010 Filter re-usable subform, based on parent field)[2023-09-27]
我最终为所有“主”表添加了一个新的字段,默认情况下这些字段会冗余地将三个字母的首字母缩写添加到每条记录中。 由于它在那里,所以我可以在主/子链接部分参考ID(有效地重建LLL000000 ID,但需要在系统中添加更多硬编码值并浪费存储空间...) 这不是一个理想的解决方案,因为它只会增加维护开销。 (不像我想到的其他一些解决方案,但仍然)。 因此,我不会将此标记为答案,而是等待其他建议。 I ended up adding a new field to all of the "main" tables wh ... -
FLID包含字符。 因此,您的参考需要在单引号内。 Me.Filter = "(([Flooring Products Query].FLID = '" & findByFLIDSearchBox & "'))" FLID contains characters. Therefore, your reference needs to be inside a single quote. Me.Filter = "(([Flooring Products Query].FLID = '" & findByFL ...
-
从父窗体调用: Me!NameOfYourSubformControl.Form.Requery 从/在子窗体本身调用: Me.Requery 要更新,您可以使用子窗体的RecordsetClone: Dim rs As DAO.Recordset Set rs = Me!NameOfYourSubformControl.Form.RecordsetClone While Not rs.EOF rs.Edit rs!YourTrueFalseFieldName.Value = ...
-
MS Access - 基于相同表格但不同记录的表单和子表单(MS Access - Form and subform based on same table, but different record)[2021-08-12]
我不知道为什么Access陷入困境,因为我总是自己使用VBA和纯SQL做事,而且从不依赖Access内置功能,这通常更有效,并避免像你遇到的那样的“错误”。 所以,如果你想像我一样编码,这是我可以提出的解决方法。 开始删除表单上的父/子(如果您愿意,主/从)关系。 在主窗体的current事件中,添加以下代码: dim strSQL as string ' adapt the following SQL where needed : ' - adapt table name ' - Replace * w ... -
您应该能够通过选择子表单容器将子表单链接到相关的组合框,然后在属性表中,转到数据 - >链接主字段。 主字段是您要从主表单连接的任何字段。 You should be able to link the subform to the combo box in question by selecting the subform container, and then in the property sheet, going to Data -> Link Master Fields. The master fi ...