Jump to content


Photo

v1.0.44 released: New GUI controls: TreeView and Status Bar


  • Please log in to reply
41 replies to this topic

#1 Chris

Chris
  • Administrators
  • 10727 posts

Posted 14 May 2006 - 08:15 PM

Here are the changes for v1.0.44:

Fixed OnClipboardChange to work even when the script is displaying a MsgBox or other dialog.

Fixed FileCreateDir not to report ErrorLevel 1 when the specified directory ends in "\". [thanks Wesley]

Fixed hotkeys Control::, Shift::, and Alt:: to fire on release of the key rather than press-down (broken by v1.0.41).

Fixed loading of icon #1 from nonstandard file types such as .bin.

Fixed ListView creation to obey the text color set by "Gui Font".

Changed and fixed the hotkey tilde prefix (~) so that hotkeys like ~Esc and Esc are considered duplicates; that is, a script cannot define both ~Esc and Esc unless they are under different #IfWin criteria (in which case ~Esc and Esc have been fixed to work properly). [thanks jballi]

Changed and improved ListViews: 1) a new option WantF2 is in effect by default, which causes an F2 keystroke to edit the current row (when not ReadOnly); 2) added LV_Modify(Row, "Vis") to scroll an item into view; 3) drag notifications occur even without AltSubmit; 4) item-change notifications have A_EventInfo set to the row number; 5) ErrorLevel no longer mirrors A_EventInfo in cases where it was never documented to do so (same for GuiContextMenu).

Improved Edit controls to select all text in response to Control-A. This can be disabled via -WantCtrlA.

Added new GUI control types TreeView and StatusBar.

#2 polyethene

polyethene

    Administrator

  • Administrators
  • 5473 posts

Posted 14 May 2006 - 08:58 PM

Ah finally, the long awaited StatusBar and TreeView controls :)
The select all hotkey in Edit controls are fantastic, they make a lot of things so much easier.

Thanks Chris, great job.

#3 polyethene

polyethene

    Administrator

  • Administrators
  • 5473 posts

Posted 14 May 2006 - 09:05 PM

This may be a bug:

Buttons: Specify -Buttons (minus Buttons) to avoid displaying a plus or minus button to the left of each item that has children.
Lines: Specify -Lines (minus Lines) to avoid displaying a network of lines connecting parent items to their children.

Using "Gui, Add, TreeView, -Lines +Buttons" I don't see the buttons?

#4 Laszlo

Laszlo
  • Fellows
  • 4713 posts

Posted 14 May 2006 - 09:27 PM

Wow! Thanks, Chris, for this nice update. The new features make many of my scripts simpler and nicer.

#5 Chris

Chris
  • Administrators
  • 10727 posts

Posted 14 May 2006 - 11:04 PM

"Gui, Add, TreeView, -Lines +Buttons" I don't see the buttons?

Ah, that's a limitation of the control that should have been documented. I've added the following: "However, specifying -Lines also prevents the plus/minus buttons from being shown for top-level items."

Thanks.

#6 Rabiator

Rabiator
  • Members
  • 292 posts

Posted 15 May 2006 - 08:29 AM

Great! Thanks for these useful features, especially TreeView!

#7 PhiLho

PhiLho
  • Fellows
  • 6850 posts

Posted 15 May 2006 - 08:43 AM

Excellent, an important release!
I updated my ahk.properties file in AutoHotkey.net (for the newest lexer, I no longer maintain the old, asm-based one).
I will explore the new GUI capabilities.

#8 Tekl

Tekl
  • Members
  • 814 posts

Posted 15 May 2006 - 09:02 AM

Hi Chris,

there's a bug with the statusbar and updown-controls:

#persistent
Gui, 1:Default
Gui,Show,h400 w400   
Gui, Add, StatusBar
SB_SetParts(120)
SB_SetText( " Test1", 1)
SB_SetText( " Test2", 2)
Gui, Add, Edit, x+5 yp-4 w40 vas_MonthlyDay_tmp gTest, 
Gui, Add, UpDown, Range-3-28, 234

Return

GuiClose:
GuiEscape:
	ExitApp
Return

Test:
Return


#9 evl

evl
  • Members
  • 1237 posts

Posted 15 May 2006 - 10:33 AM

Cool! A statusbar with an updown control :lol: . Actually it could be useful if it could be added correctly - e.g. cycling through different things/histories in the statusbar.

#10 Micha

Micha
  • Members
  • 539 posts

Posted 15 May 2006 - 10:35 AM

Hi Chris,
superb! great job.
I'm sure that everybody who uses my Treeview-dll are glad, that they can get rid of of the dll with all its dependencies and problems.

Perhaps a stupid question: Is it planed to support Treeviews in other applications (remotely controlling them) or is it already possible?

Ciao
Micha

#11 PhiLho

PhiLho
  • Fellows
  • 6850 posts

Posted 15 May 2006 - 11:07 AM

Tekl didn't care to explain what the bug is...
evl provided a hint: the Up-Down control is associated to the status bar instead of the edit control.
The workaround is obvious: put the status bar definition at the end of the GUI declarations.

@evl: why not. In SciTE, I implemented the single click in the status bar to make it cycling its infos: simple, easy and effective.

#12 Chris

Chris
  • Administrators
  • 10727 posts

Posted 15 May 2006 - 12:41 PM

Thanks for the bug report. It should be fixed in the next update. As PhiLho said, the workaround is to add the status bar last (or at least after all your up-down controls).
Details: This is caused by status bars needing to be kept at the bottom of the Z-order to alleviate other controls getting drawn on top of them. But doing this causes an UpDown to auto-buddy with the bar rather than the most recently added control.

Is it planed to support Treeviews in other applications (remotely controlling them) or is it already possible?

There is a plan to add data-extraction feature for TreeView similar to the one that already exists for ListView (ControlGet List).

Thanks.

#13 Chris

Chris
  • Administrators
  • 10727 posts

Posted 15 May 2006 - 04:02 PM

Here are the changes for v1.0.44.01:

Fixed StatusBar's grabbing of UpDowns that are added after it. [thanks Tekl]

Changed Round() to display exactly N decimal places rather than obeying SetFormat.

#14 Tekl

Tekl
  • Members
  • 814 posts

Posted 16 May 2006 - 06:36 AM

Hi,

thanks for the fast bugfix. Btw. is there a way to differ the parts which has been clicked? I want different actions an different parts of the status-bar (double-click).

#15 PhiLho

PhiLho
  • Fellows
  • 6850 posts

Posted 16 May 2006 - 07:58 AM

This is becoming off topic, questions about the new controls should be moved elsewhere.

The variable A_EventInfo contains the part number.