Skip to content

Instantly share code, notes, and snippets.

View tfaris's full-sized avatar

Tom Faris tfaris

  • NicheVision Inc.
  • Akron,OH
View GitHub Profile
@tfaris
tfaris / gist:2797a487f29155077389
Created May 5, 2014 20:35
IronPython progressbar
from bootstrap import AX
from System.Windows.Forms import *
from System.Drawing import *
import threading
import time
# Create the form
f = Form()
f.Size = Size(500, 200)
@tfaris
tfaris / gist:5673562
Last active December 17, 2015 21:19
SpreadsheetGear Dropdown
# To add a dropdown
dd_range = sheet.Range[0, 0]
shape = sheet.Shapes.AddFormControl(SpreadsheetGear.Shapes.FormControlType.DropDown,
sheet.WindowInfo.ColumnToPoints(dd_range.Column), # left
sheet.WindowInfo.RowToPoints(dd_range.Row), # top
width_in_points, # width
height_in_points) # height
# all the measurements above are in POINTS rather than row/column. I forget the calculations exactly.. there are
# conversions from columns/rows to points as seen above
shape.ControlFormat.AddItem("some string")
@tfaris
tfaris / textareaVisualMargin.html
Created April 2, 2013 05:53
Vertical printer margin visual aid for textareas, position-able by specifying the column to "draw" at. Done entirely with CSS positioning and jQuery - no images.
<html>
<head>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<style>
.container{
position:relative;
left:0;
top:0;
}
textarea{