Jump to content


Photo

Ahk_L: more customization settings for GUI Controls.


  • Please log in to reply
3 replies to this topic

#1 Cephei1

Cephei1
  • Members
  • 388 posts

Posted 10 July 2012 - 11:12 PM

hi guys and Lexikos ;)

I think that items in the listbox/listview should be customisable more easily. Such as height of each item, the text's position withing the selection, the text size, colour, background colour, highlight colour, etc.

Some of these things are allready possible but they require alot of brain power and forum posts before one can implement them into his or her script.

I propose that an easier option should be present, for instance for Listboxes, you should be able to set these settings in the 'Options' field when adding the Listbox control to the gui.
For listview, additional options in the LV_ADD() function / LV_MODIFY etc.

I think this 'Additional' setting proposal applies to ALL GUI CONTROLS, not just listview and listboxes. GUI's is an area that can be greatly improved with little feedback from everyone. Suggest them below :)

#2 Lexikos

Lexikos
  • Administrators
  • 8839 posts

Posted 10 July 2012 - 11:47 PM

Specifically what options are you requesting, and how are they currently implemented in script (a link will do)?

#3 Zaelia

Zaelia
  • Members
  • 705 posts

Posted 12 July 2012 - 09:25 PM

When I read(ed) ideas about listview, my first opinion was to create a table, a grid or a spreadsheet gui control, with each "box" who have their owned options (herited by the grid, or colomn, or row, or added alone). To create image list for to attach icon, to use dllcall or other postmessage for change some color or other feature, etc... those are not elegeant, and weakness with customization. I haven't the knowledge for create this but to add a spreadsheet gui control inside ahk will be the most good thing of the year (and a kind of listview can be create with too), ahk_l with object and method (for example a thing who looks like excel macro and script) are desgined for a fully controlable spreedsheet, no ?

#4 Cephei1

Cephei1
  • Members
  • 388 posts

Posted 21 July 2012 - 02:19 PM

Okay. I will add more when I get little time.

GroupBoxes

Okay when you use them on the default background, they are smooth and round. But when you change the background colour and make the GroupBox text another colour , they turn all square and Windows98 style (which is horrible).
Posted Image
Posted Image

ListView

Okay, currently the following Functions exist: LV_Add(), LV_Insert, LV_Modify, LV_Delete.

I think four additional functions should be added:
LV_MoveRowUp( RowName or Number )
LV_MoveRowDown( RowName or Number )
LV_MoveColLeft( ColName or Number )
LV_MoveColRight( ColName or Number )
As I managed to do after a lot of head scratching in my SearchAssist script, I developed this to reorder the Rows:

TotalItems=5

Gui, Add, ListView, w110 NoSortHrd -Hdr +Theme +AltSubmit R%TotalItems% gLV_Sel vLV , Order
Loop, %TotalItems%
	LV_Add("","Item " A_Index)
Gui, Add, Button, x+ yp gMove_Up, Move Item Up
Gui, Add, Button, xp y+ gMove_Dn, Move Item Down
Gui, Show

LV_Sel:
	If A_GuiEvent = Normal
		LV_Sel := A_EventInfo
Return

Move_Up:
	If LV_Sel = 1
	{
		GuiControl, Focus, LV
		LV_Modify(LV_Sel,"Select Focus")
		Return
	}
	LV_GetText(Slave,LV_Sel)
	LV_Insert(LV_Sel-1,"",Slave)
	LV_Delete(LV_Sel+1)
	GuiControl, Focus, LV
	LV_Sel--
	LV_Modify(LV_Sel,"Select Focus")
Return

Move_Dn:
	If LV_Sel = %TotalItems%
	{
		GuiControl, Focus, LV
		Return
	}
	LV_GetText(Slave,LV_Sel+1)
	LV_Insert(LV_Sel,"",Slave)
	LV_Delete(LV_Sel+2)
	GuiControl, Focus, LV
	LV_Sel++
Return

Instead of my Move_Up/Move_Dn labels. A simple LV_MoveRowUp()/LV_MoveRowDown() Function would be much easier and useful to a lot of people. :wink:
[/list]