更改UIButton的imageview的alpha(Change alpha of imageview of UIButton)
有没有办法改变UIButton的imageview的alpha? 我已经尝试了继承UIButton并做下面的代码,但它不起作用。
self.imageView.alpha = 0.0;
我知道这可以通过添加外部UIImageView作为子视图到UIButton来完成,但我想知道它是否可能没有它。 谢谢!
Is there any way to change alpha of UIButton's imageview? I already tried subclassing UIButton and do below code, but it doesn't work.
self.imageView.alpha = 0.0;
I know it can be done by adding external UIImageView as a subview to UIButton but I want to know if its possible without it. Thanks!
原文:https://stackoverflow.com/questions/35040233
更新时间:2022-08-25 19:08
最满意答案
Private Sub UserForm_Initialize() Me.WebBrowser1.Navigate "http://www.bbc.co.uk" End Sub
Private Sub UserForm_Initialize() Me.WebBrowser1.Navigate "http://www.bbc.co.uk" End Sub
相关问答
更多-
Excel VBA用户窗体控件(Excel VBA Userform Controls)[2024-05-16]
我会将此代码用于ComboBox更改事件 : Private Sub templateComboBox_Change() Dim p As MSForms.Page For Each p In MultiPage.Pages p.Visible = (p.Name = templateComboBox.Value) Next End Sub I would use this code for ComboBox change event: Private Sub t ... -
没有看实际的公式: vMatch = xlBook.Sheets(client).Evaluate(sformula) 您需要让Excel运行Evaluate ,但是您应该使用Worksheet表单而不是Application表单,否则有可能在与您正在使用的工作表不同的工作表的上下文中评估公式。 Without looking at the actual formula: vMatch = xlBook.Sheets(client).Evaluate(sformula) You need to ha ...
-
我相信标准VBA中没有包含真正的状态栏(没有引用),但是您可以滥用标签控件。 请注意,此方法会为了用户清晰度而交换性能(用户可以看到应用程序正在运行,但它比没有状态栏的同一应用程序慢) 只需添加三个标签,一个用于状态文本,一个用于实际移动条,一个用于完整条形边框。 并格式化它们以适合您的应用程序(见下图): 代码如下: Private Sub cbStart_Click() one_percent_bar_width = lLoadBar.Width / 100 'width of one percent ...
-
停用Excel VBA用户窗体(deactivate Excel VBA userform)[2022-06-11]
进度条的用法是显示当前正在运行的代码的进度。 而且我不知道在代码运行时是否有人想对表单做任何事情...... 无论如何,如果你想在表单显示时与表单交互,你可以尝试添加下面的代码: UserForm.Show vbvModeless 要更新Modeless表单,您必须在子例程中添加DoEvents 。 如果您想在最后关闭表单,请执行以下操作: UserForm.Unload 这是我会做的: 点击一个按钮来运行你的宏 Private Sub Button1_Click() Call userfor ... -
如果您只想关闭Userform,请使用Unload Me而不是Application.Quit 。 If you just want to close the Userform use Unload Me instead of Application.Quit.
-
Private Sub UserForm_Initialize() Me.WebBrowser1.Navigate "http://www.bbc.co.uk" End Sub Private Sub UserForm_Initialize() Me.WebBrowser1.Navigate "http://www.bbc.co.uk" End Sub
-
如果使用图像控件显示图表,则根据需要调整图像控件的大小以适合用户表单,然后将图像控件的“PictureSizeMode”属性设置为“fmPictureSizeModeStretch”。 If you are using an Image control to display the chart, then size the image control to fit the userform as per your requirements and then set the "PictureSizeMode" ...
-
在VBA Excel中以编程方式将OptionButtons添加到Userform(Adding OptionButtons to the Userform programatically in VBA Excel)[2022-02-25]
如果您有一个名为UserForm1的表单,其中包含一个名为CommandButton1 您可以为UserForm设置Initialize方法,以编程方式创建一组单选按钮 Private Sub UserForm_Initialize() Dim OptionList(1 To 3) As String Dim btn As CommandButton Set btn = UserForm1.CommandButton1 Dim opt As Control Dim s ... -
从字符串(VBA)引用Excel Userform控件名称值(Referencing Excel Userform Control Name Value From String (VBA))[2022-05-11]
像这样( Me是UserForm) Me.Controls("TextBox1").Value Like this (where Me is the UserForm) Me.Controls("TextBox1").Value -
像正常一样调用表单,然后您可以遍历已经加载的表单并在找到正确的表单后使用该变量。 Dim Obj As Object For Each Obj In VBA.UserForms 'Assuming you only have one form open prior to showing this one If StrComp(Obj.Name, Me.Name, vbTextCompare) = 0 Then Me.lbSerial = Format(Obj.listAppt ...