TechCoder Posted April 18, 2014 Share Posted April 18, 2014 I've developed a full-screen program to interface with a calendar (allows the user to show current bookings, etc on a screen in the front office), however, having some trouble with the table. I'm looking for ideas on how to best 'attack' this in AutoIt. Writing this in php, using html tables, css, etc. it looks great. nice transparency, clean table lines, etc. However, in porting this to AutoIt, I'm having trouble getting the table to display clean lines, transparency and good text. I tried using an embedded html page (YUK - I have had better screens, but this is the 'best' with everything going on I want....) and also using the Table UDF ('?do=embed' frameborder='0' data-embedContent>> things are much better, but not happy with the lines... - I have a simlar issue as reported page-2#entry841285)'>page-2#entry841285) I'm happiest with the results from the Table UDF, but the odd black lines (on the shot above) appear here/there and change position depending on the data. When configured to display a colored border, the issue is still there and often shows up worse as the 'missing' pixel or two create a large border and often with the missing pixel inside. I chose the Table UDF because of the transparency, borders and easy-to-update text in each 'cell' - done as labels here (as I understand it, ListView, etc. can't do all that - I'm still pretty new with AutoIt and haven't learned all the best GUI bits yet). And, I'm very happy with the results, other than those odd lines (which are keeping me from releasing the product). Any suggestions on a better route to go to get nice, clean, no border, easily updated, transparent tables with AutoIt like the very easy to do html page? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 19, 2014 Moderators Share Posted April 19, 2014 TechCoder,The lines in the table are caused when you pass fractional values for cell width - the rounding errors when the display converts these values to whole pixels produce the gaps. Convert your parameters to integer values and the problem goes away as you can see in this script based on the Table UDF example: expandcollapse popup#include "Table.au3" ;----- GUI (Double Buffered) ----- $GUI = GUICreate("", 1350, 400, -1, -1, -1, 0x2000000) ;----- Make sure GUI exists BEFORE creating Tables ----- GUISetState() ;----- Lock GUI until tables drawn ----- GUISetState(@SW_LOCK) $Table1 = _GUICtrlTable_Create(10, 10, 100.75, 40, 8, 6, 0) ; Fractional values <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< _GUICtrlTable_Set_RowHeight($Table1, 1, 35) _GUICtrlTable_Set_Justify_All($Table1, 1, 1) _GUICtrlTable_Set_TextFont_All($Table1, 8.5, 800, 0, "Tahoma") _GUICtrlTable_Set_CellColor_Row($Table1, 1, 0x555555) _GUICtrlTable_Set_TextColor_All($Table1, 0x555555) _GUICtrlTable_Set_TextColor_Row($Table1, 1, 0xFFFFFF) For $row = 3 To 10 Step 2 _GUICtrlTable_Set_CellColor_Row($Table1, $row, 0xDDDDDD) Next _GUICtrlTable_Set_Text_Row($Table1, 1, "Fixing|Size|Weight|Net|Gross|Order") _GUICtrlTable_Set_Text_Row($Table1, 2, "Block|20.0|0.01|300|340|No") _GUICtrlTable_Set_Text_Row($Table1, 3, "Screw|8.5|0.3|50|100|No") _GUICtrlTable_Set_Text_Row($Table1, 4, "Rivet|0.1|0.4|10|11|Yes") _GUICtrlTable_Set_Text_Row($Table1, 5, "Rope|300.0|100.0|2|10|No") _GUICtrlTable_Set_Text_Row($Table1, 6, "Tack|10.6|0.3|1000|1011|Yes") _GUICtrlTable_Set_Text_Row($Table1, 7, "Nail|30.3|0.4|400|600|No") _GUICtrlTable_Set_Text_Row($Table1, 8, "Staple|0.3|0.05|10000|12000|No") _GUICtrlTable_Set_Border_Table($Table1, 0x555555) $Table2 = _GUICtrlTable_Create(700, 10, 100, 40, 8, 6, 0) ; Integer values <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< _GUICtrlTable_Set_RowHeight($Table2, 1, 35) _GUICtrlTable_Set_Justify_All($Table2, 1, 1) _GUICtrlTable_Set_TextFont_All($Table2, 8.5, 800, 0, "Tahoma") _GUICtrlTable_Set_CellColor_Row($Table2, 1, 0x555555) _GUICtrlTable_Set_TextColor_All($Table2, 0x555555) _GUICtrlTable_Set_TextColor_Row($Table2, 1, 0xFFFFFF) For $row = 3 To 10 Step 2 _GUICtrlTable_Set_CellColor_Row($Table2, $row, 0xDDDDDD) Next _GUICtrlTable_Set_Text_Row($Table2, 1, "Fixing|Size|Weight|Net|Gross|Order") _GUICtrlTable_Set_Text_Row($Table2, 2, "Block|20.0|0.01|300|340|No") _GUICtrlTable_Set_Text_Row($Table2, 3, "Screw|8.5|0.3|50|100|No") _GUICtrlTable_Set_Text_Row($Table2, 4, "Rivet|0.1|0.4|10|11|Yes") _GUICtrlTable_Set_Text_Row($Table2, 5, "Rope|300.0|100.0|2|10|No") _GUICtrlTable_Set_Text_Row($Table2, 6, "Tack|10.6|0.3|1000|1011|Yes") _GUICtrlTable_Set_Text_Row($Table2, 7, "Nail|30.3|0.4|400|600|No") _GUICtrlTable_Set_Text_Row($Table2, 8, "Staple|0.3|0.05|10000|12000|No") _GUICtrlTable_Set_Border_Table($Table2, 0x555555) ;----- Unlock GUI to show tables ----- GUISetState(@SW_UNLOCK) ;----- Loop ----- Do Sleep(10) Until GUIGetMsg() = -3M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
TechCoder Posted April 19, 2014 Author Share Posted April 19, 2014 YUP! Exactly the issue. Went through and checked for "/" and "Round", etc. and added Int() around it - looks great! Of course, the background is now out of place a bit, but that is simple enough to fix (have to do the math in the same way instead of a separate equation - no biggie). This puts me back on track with the project - THANKS! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now