Sign in to follow this  
Followers 0
Michel Claveau

Grid input

10 posts in this topic

#1 ·  Posted (edited)

Hi!

Just a exemple of componant.

Not finished, but usable.

[autoit]#include-once

#include <GuiConstantsEx.au3>

#include <Array.au3>

#include <WindowsConstants.au3>

#include <StaticConstants.au3>

Global $s_GuiFocus_LastClassName="",$s_FocusNew=""

saiod1()

Exit

Func saiod1()

Local $AccelKeys, $gui, $atmp, $hListView, $clef

Local $contextmenu, $btnotes, $rpquit, $ligne, $xx, $yy

Local $llFocus=1,$ccFocus=1

$gui = GUICreate("Saisie 'GRID' ", 805, 400)

GUISetBkColor(0xffffaa)

;-----PopMenu-------

$contextmenu = GUICtrlCreateContextMenu(-1)

$pmenreg = GUICtrlCreateMenuItem('&Enregistrer', $contextmenu)

$pmcompte = GUICtrlCreateMenuItem('&Compte (naviguer vers)', $contextmenu)

$pmtiers = GUICtrlCreateMenuItem('&Tiers (naviguer vers)', $contextmenu)

GUICtrlCreateMenuItem("", $contextmenu)

$btnotes = GUICtrlCreateMenuItem('&Bloc-note(s)', $contextmenu)

GUICtrlCreateMenuItem("", $contextmenu)

$rpquit = GUICtrlCreateMenuItem('&Quitter (abandonner)', $contextmenu)

;-----PopMenu-------

$btdown=GUICtrlCreateButton("Down",10,-100,100,40)

$btup=GUICtrlCreateButton("Up",110,-100,100,40)

$btins=GUICtrlCreateButton("Ins",210,-100,100,40)

$btdel=GUICtrlCreateButton("Del",310,-100,100,40)

$btenter=GUICtrlCreateButton("Enter",410,-100,100,40)

$btesc = GUICtrlCreateButton("Echap", 510, -100, 100, 40)

GUICtrlCreateLabel(" {Up} {Down} {Tab} {Shift-Tab} {Ctrl-Ins} {Ctrl-Del} {Enter} {Esc} etc. ",30,10,400,30)

GUISetFont(14,400,0,"Arial Narrow")

Local $nblig=10,$nbcol=6

Dim $ligt[$nblig]=[30,30,60,30,30,30,30,30,30,30] ;size lines

Dim $colt[$nbcol]=[80,100,320,90,90,90] ;size col

Dim $coll[$nbcol]=["Compte","Tiers","Libell

gridinput2.au3

Edited by Michel Claveau
1 person likes this

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

These lines (copy&paste error)

$result ="Ligne : "& String($llFocus) [email="&@CRLF"]&@CRLF[/email]
$result&="Col : "& String($ccFocus) [email="&@CRLF"]&@CRLF[/email] [email="&@CRLF"]&@CRLF[/email]

have to be changed to this

$result ="Ligne : "& String($llFocus) & @crlf
$result&="Col : "& String($ccFocus)  & @crlf  & @crlf

Otherwise nice example :).

Edited by KaFu

Share this post


Link to post
Share on other sites

Hi!

Thanks.

The problem is with forum, and BBCodes who "interprete" my exemple...

Share this post


Link to post
Share on other sites

Anticipated something like that :)... Was in need of something like this 2 weeks ago, sadly I went into another direction (Listview with dynamic InputBox overlay)... maybe I'll change in the long run to your example :party:...

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Re!

> Listview with dynamic InputBox overlay

Hmmmm...

I tried this way. It's fast.

But...

Difficult for use keyboard, for navigate cellule to cellule. I do not found how to have lines with differents heights.

Also, I tried another way: listview, then {Enter} open a child window, who contain all fields of the selected line. At close, values are set in listview's line. It's easy, but no nice, and no convivial.

Edited by Michel Claveau

Share this post


Link to post
Share on other sites

Also, I tried another way: listview, then {Enter} open a child window, who contain all fields of the selected line. At close, values are set in listview's line. It's easy, but no nice, and no convivial.

Yep, that's the way I do it now (child gui with input control, described it wrong above :) ), and you're right, design is not nice and keyboard access is not possbile... that's why I guess I'll switch to your design in the long run :party:...

Share this post


Link to post
Share on other sites

Hi!

Just a exemple of componant.

Not finished, but usable.

Looks good Michel.

(I like the comment because it compares to "not finished, not usable" for the one I posted :) )


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

Hi!

Looks good Michel. (I like the comment

You like/found good only the comment?

Is it that, the "english humor" ?

We say that, in England, on June 1st, cars are going to run to the right (of road).

And, if the experiment is decisive, trucks will begin from July.

Can you confirm?

Share this post


Link to post
Share on other sites

Hi!

You like/found good only the comment?

Is it that, the "english humor" ?

No, I said "looks good" and that was about your component.

The comment about your comment was just an extra, um, comment, and that bit was just my humour which might be British, I am unable to tell, but you can ignore it.

We say that, in England, on June 1st, cars are going to run to the right (of road).

And, if the experiment is decisive, trucks will begin from July.

Can you confirm?

:) Yes of course it's true, and if that works well cylists will begin in August. I hear that if that stage is reached the French will start the reverse process, (but beginning with roller skaters), because they don't want to drive on the same side as the British.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

Hi!

I have a second example, with vertical scroll (see in the first message).

That take me much time, because the "standard" scrollbar in Autoit do not correspond to my idea. Mine is less complete (no drag the cursor, cursor size is fixe), but it is more adapted to the grid input.

Also, I lost time, before found $WS_EX_CONTROLPARENT in the GUI-child (without it, {TAB} do not run in a child).

Last point (for the moment), use grid input only with few lines. If >250, that become slow...

*** sorry for my bad english ***

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0