Re: [Gambas-user] Control + key combination detection Q

2010-10-07 Thread richard terry
On Friday 08 October 2010 11:05:18 Benoît Minisini wrote: > > On Friday 08 October 2010 01:11:02 Jack wrote: > > > richard terry a écrit : > > > >>From the docs: > > > > > > > >If Key.Code = Key["R"] And If Key.Control Then > > > > > > > >Print "You hit CTRL+R" > > > > > > > >End If

Re: [Gambas-user] Control + key combination detection Q

2010-10-07 Thread Benoît Minisini
> On Friday 08 October 2010 01:11:02 Jack wrote: > > richard terry a écrit : > > >>From the docs: > > >If Key.Code = Key["R"] And If Key.Control Then > > > > > >Print "You hit CTRL+R" > > > > > >End If > > > > > > If my hands this does the following > > > > > > Key.code

Re: [Gambas-user] Control + key combination detection Q

2010-10-07 Thread Jack
richard terry a écrit : > On Friday 08 October 2010 01:11:02 Jack wrote: >> richard terry a écrit : >>> >From the docs: >>> >>>If Key.Code = Key["R"] And If Key.Control Then >>>Print "You hit CTRL+R" >>>End If >>> >>> If my hands this does the following >>> Key.code = 1677724 >>>

Re: [Gambas-user] Control + key combination detection Q

2010-10-07 Thread richard terry
On Friday 08 October 2010 01:11:02 Jack wrote: > richard terry a écrit : > >>From the docs: > > > >If Key.Code = Key["R"] And If Key.Control Then > >Print "You hit CTRL+R" > >End If > > > > If my hands this does the following > > Key.code = 1677724 > > Key["R"] = 82 > > Key.cont

Re: [Gambas-user] Control + key combination detection Q

2010-10-07 Thread Jack
richard terry a écrit : >>From the docs: > >If Key.Code = Key["R"] And If Key.Control Then >Print "You hit CTRL+R" >End If > > If my hands this does the following > Key.code = 1677724 > Key["R"] = 82 > Key.control = true > > but I'm probably pressing ctrl + small r I guess: >

[Gambas-user] Control + key combination detection Q

2010-10-07 Thread richard terry
>From the docs: If Key.Code = Key["R"] And If Key.Control Then Print "You hit CTRL+R" End If If my hands this does the following Key.code = 1677724 Key["R"] = 82 Key.control = true but I'm probably pressing ctrl + small r I guess: Clearly they don't match If I put on the capsl

Re: [Gambas-user] Substitute of the object names

2010-10-07 Thread Biro Zoltan
Another simple solution: DIM x AS String[3] DIM i AS Short DIM obj AS Object[] = [n1, n2, n3] x[0] = "1" x[1] = "2" x[2] = "3" i = 0 FOR i = 0 TO 2 obj[i].text = x[i] NEXT Best regards, Zoli B. 2010. 10. 7, csütörtök keltezéssel 10.22-kor Rolf-Werner Eilert ezt írta: > Ok, there

Re: [Gambas-user] Substitute of the object names

2010-10-07 Thread Biro Zoltan
SOLVED!!! DIM x AS String[3] DIM i AS Short DIM obj AS Object x[0] = "1" x[1] = "2" x[2] = "3" i = 0 FOR i = 0 TO 2 FOR EACH obj IN sidp.Children IF Lower(object.Type(obj))="textbox" AND obj.name="n"&Str$(i+1) obj.text = x[i] ENDIF NEXT NEXT END Here I scanned all obje

Re: [Gambas-user] Substitute of the object names

2010-10-07 Thread Rolf-Werner Eilert
Ok, there is one thing you have to take care of, because Gambas works as C++ here and wants the arrays to be instantiated after declaration. So to make it easy, just add a NEW to the DIM line: DIM x AS NEW String[20] And now let me see how I did this in my programs... It's been a long time sin

Re: [Gambas-user] Substitute of the object names

2010-10-07 Thread Biro Zoltan
Thank you Rolf to helping me. Please take a look on the folowing piece of code: (I never used array of texboxes, but I think is something like I did here) PUBLIC SUB filltheboxes() DIM x AS String[20] DIM y[20] AS TextBox DIM i AS Short x[0] = "1" x[1] = "2" x[2] = "3" x[3] = "4" x[4] =