Bevel Button for Icon deactivates

I am using a Bevel Button as a “save” Icon Button , it deactivates even with the “autoDeactive” turned off.
also i am not able to simulate a click on the Bevel button it does not have a Push Event. There are times I would like to use the Push event.
I thought of using a Canvas Button, but that does not have an “action” event.

can a click be simulated on a Bevel Button by “call BevelButton”
and how might i stop the Bevel Button from Disabling it self.

Place the code now in the button Action event in a method, for instance Bevel1_Push, that is called from Action. Then you will be able to call it at any time like you want.

BTW if you wanted to make a canvas button, add MouseDown, add Return True in it, and in MouseUp :

if x >=0 and x<= me.width and _ y >= 0 and y <= me.height then // action end if

I like the graphical behavior of the Bevel button better.
So if i move the code to a Method it the same as bypassing the button

how is it possible to prevent the Bevel button from disabling it self.

after i excute this following code by a Bevel Button (saveItemButton) it goes and remains inactive

button attributes
Visible ON
AutoDeactivate OFF
Enabled ON
hasMenu NO
Bevel Small Bevel
Icon Custom
Button Type Button
AcceptFocus OFF

[code]// Public Function LoadItem(filePath As String, fileName As String)
Dim FileArr(20) As String
Dim rtnArr(20) As String
Dim InvC As Integer
Dim TempArr(20) As String
Dim DataLine(15) As String
Dim filenum As Integer
Dim virtualWidthHeight As String
Dim virtualPricing As String
Dim ClipB As Clipboard

Dim fileName As String = MainWin.ItemList.Text
Dim Arr1(20) As String
Dim Arr2(30) As String
Dim line As String
Dim strBuf As String
Dim errorText As Text
Dim t As TextInputStream
Dim lc As Integer


t = TextInputStream.Open(readPath)
lc = 0
While Not t.EOF
FileArr(lc) = t.ReadLine
lc = lc + 1

MainWin.ItemSaleFreq.Text = “”
MainWin.ItemSalePerc.Text = “”
//ItemCost.Text = “”
MainWin.ItemInvLink.Text = “”
MainWin.ItemBulkFlag.Text = “”
MainWin.ItemCalcSale.Text = “No Sale Info”

DataLine = Split(FileArr(0), “|”)
// ******** //
MainWin.ItemTitle.Text = DataLine(0)
MainWin.ItemPrice.Text = DataLine(1)
MainWIn.ItemWeight.Text = DataLine(2)
MainWin.ItemLocation.Text = DataLine(3)
MainWin.ItemPreBuilt.Text = DataLine(4)
MainWin.ItemCode.Text = DataLine(5)
MainWin.ItemSaleFreq.Text = DataLine(6)
MainWin.ItemSalePerc.Text = DataLine(7)
MainWin.ItemKeywords.Text = DataLine(8)

’ load inv Links
If DataLine(9) <> “” Then
rtnArr = Split(DataLine(9), “,”)
For InvC = 0 To UBound(rtnArr)
Next InvC
’ ItemInvLink.Text = Replace(ItemInvLink.List(0), “.dat”, “”) 'transfer first item to top of list
MainWin.ItemInvLink.Text = MainWin.ItemInvLink.List(0)
End If

If UBound(DataLine) > 9 Then
MainWin.ItemBulkFlag.Text = DataLine(10)
End If

MainWin.ItemDescription.Text = ReplaceAll(FileArr(1), “
”, Chr(13))
MainWin.ItemDetails.Text = FileArr(2)
MainWin.ItemVenderURL.Text = FileArr(3)

’ Inventory Link(s)
If MainWin.ItemInvLink.Text <> “” And CmpPattern(MainWin.ItemInvLink.Text, “(?i)[a-z][a-z][a-z]\-[0-9]+$”) = True Then
rtnArr = GetInvLinkValue(GetDataFolder.Child(SoftName).Child(“Data”).Child(“pro”).Child(MainWin.ItemInvLink.Text + “.dat”))
'ItemWholeSale.Text = rtnArr(0)
MainWin.ItemInventory.Text = rtnArr(1)
MainWin.ItemInventory.Text = FileArr(4)
End If

MainWin.ItemRemoteUrl.Text = “” + MainWin.ItemCode.Text

If MainWin.ItemSaleFreq.Text > “” Then
MainWin.ItemCalcSale.Text = CalculateSale(MainWin.ItemPrice.Text, MainWin.ItemSaleFreq.Text, MainWin.ItemSalePerc.Text)
MainWin.ItemCalcSale.Text = “”
End If

fileName = Replace(fileName, “.dat”, “”)

MainWin.Status.Text = MainWin.ItemList.Text + " … Loaded"
MainWin.ItemSaveButton.Enabled = False

If CmpPattern( MainWin.ItemKeywords.Text, “(?i)amazon”) = True Then
//AmazonStockCk = 1
//AmazonStockCk = 0
End If

//If CopyToClipboardck = 1 Then
///ClipB.SetText ViewItemUrl.Text + “|” + ItemTitle.Text + " Best Love"
//End If

If MainWin.ItemBulkFlag.Text <> “” And MainWin.ItemSaleFreq.Text <> “” And MainWin.ItemSalePerc.Text <> “” Then
MsgBox “Warning! On Sale Fields and Bulk Sale Fields are both set, only one option allowed at one time”
End If

Catch e As IOException
errorText = "File IO Error: " + e.Reason
End Try

MainWin.ItemSaveButton.Enabled = False

Is this the button you are talking about???

As dave mentioned I supect the issue is the code marked

[quote=336965:@David Cullins]

… snipped …

MainWin.Status.Text = MainWin.ItemList.Text + " … Loaded"

MainWin.ItemSaveButton.Enabled = False <<<<<<<<<<<<<

Dave Yes that is the button.

ohh yes i Disabled the Button early on in the design because i only wanted it to be enabled if there were changes the record.