Notifications
Clear all

[Closed] UI dot net btns question

I have a problem with dotnet btns.
The problem is that the image is placed 1px right and 1px down.

		on test open do
 		(
 			button_sett.image = StringToImage btn_settings_img
 			button_sett.FlatAppearance.BorderSize = 0
 			button_sett.FlatStyle = button_sett.FlatStyle.Flat
 		   -- button_sett.left = -1
 		   -- button_sett.top = -1
 		)
        [img] http://artrender.info/tmpmike/ui_btns.jpg [/img]
        
        
        If I use             
			button_sett.left = -1
          			button_sett.top = -1
      then I get some weird results. 
        If I make the btns bigger and move them left and upper, then I have overlapping problems.
     
     ImageAlign is read only property.
     button_sett.Padding  = dotnetobject "System.Windows.Forms.Padding" -1 doesnt work as well.

Here is the TEST SCRIPT

     PS: (I use the function of LoneRobot to store the btn images in string mode)
1 Reply

if you want to have a button with exactly the same size as an icon on it use BackgroundImage instead of Image property