Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #13708 > unrolled thread
| Started by | David Linda <dlinda2011@gmail.com> |
|---|---|
| First post | 2022-12-15 10:01 -0800 |
| Last post | 2022-12-16 15:58 -0500 |
| Articles | 5 — 5 participants |
Back to article view | Back to comp.lang.clipper.visual-objects
Can anyone tell me why the code below doesn't work? David Linda <dlinda2011@gmail.com> - 2022-12-15 10:01 -0800
Re: Can anyone tell me why the code below doesn't work? JohnMartens <martens@tennishulp.info> - 2022-12-15 20:11 +0100
Re: Can anyone tell me why the code below doesn't work? "datas...@gmail.com" <datasoftbj@gmail.com> - 2022-12-15 12:04 -0800
Re: Can anyone tell me why the code below doesn't work? dlzc <dlzc1@cox.net> - 2022-12-16 08:14 -0800
Re: Can anyone tell me why the code below doesn't work? Jamal <nospam@example.com> - 2022-12-16 15:58 -0500
| From | David Linda <dlinda2011@gmail.com> |
|---|---|
| Date | 2022-12-15 10:01 -0800 |
| Subject | Can anyone tell me why the code below doesn't work? |
| Message-ID | <1f2106f3-2ce2-458b-b22f-70e12b0f34afn@googlegroups.com> |
I placed the code below in the activate event of a datawindow and I could see no listbox. Then I put the code in the click event of a pushbutton and still no listbox.
local oDim := Dimension {0,0,200,200}
local oList := ListBox{self, 99, Point{10,10},oDim}
oList:Show(SHOWNORMAL)
Thanks,
Dsvid
[toc] | [next] | [standalone]
| From | JohnMartens <martens@tennishulp.info> |
|---|---|
| Date | 2022-12-15 20:11 +0100 |
| Message-ID | <0e1b58a1-28a1-db66-2c31-9211f5886877@tennishulp.info> |
| In reply to | #13708 |
I've got no idea why it did not work.
Is it possible to put the listview on the data window with the Window
designer, hide is in the postinit and show() it in the case of the event ?
John
Op 15-12-2022 om 19:01 schreef David Linda:
> I placed the code below in the activate event of a datawindow and I could see no listbox. Then I put the code in the click event of a pushbutton and still no listbox.
>
> local oDim := Dimension {0,0,200,200}
> local oList := ListBox{self, 99, Point{10,10},oDim}
>
> oList:Show(SHOWNORMAL)
>
> Thanks,
>
> Dsvid
>
>
[toc] | [prev] | [next] | [standalone]
| From | "datas...@gmail.com" <datasoftbj@gmail.com> |
|---|---|
| Date | 2022-12-15 12:04 -0800 |
| Message-ID | <ceff6f3c-3ed6-4c8f-b0f9-26a8c4b8ccd9n@googlegroups.com> |
| In reply to | #13708 |
try
local oDim := Dimension {200,200}
J.S
Dňa štvrtok 15. decembra 2022 o 19:01:20 UTC+1 používateľ dlind...@gmail.com napísal:
> I placed the code below in the activate event of a datawindow and I could see no listbox. Then I put the code in the click event of a pushbutton and still no listbox.
>
> local oDim := Dimension {0,0,200,200}
> local oList := ListBox{self, 99, Point{10,10},oDim}
>
> oList:Show(SHOWNORMAL)
>
> Thanks,
>
> Dsvid
[toc] | [prev] | [next] | [standalone]
| From | dlzc <dlzc1@cox.net> |
|---|---|
| Date | 2022-12-16 08:14 -0800 |
| Message-ID | <2ee16d00-9ca1-4d83-88cf-ba1ce824cc7en@googlegroups.com> |
| In reply to | #13708 |
On Thursday, December 15, 2022 at 11:01:20 AM UTC-7, dlind...@gmail.com wrote:
> I placed the code below in the activate event of a datawindow
> and I could see no listbox. Then I put the code in the click event
> of a pushbutton and still no listbox.
>
> local oDim := Dimension {0,0,200,200}
Illegal index, don't believe you can have "0" as an array index. {1,1,200,200} might work, or at least not throw an error.
> local oList := ListBox{self, 99, Point{10,10},oDim}
>
> oList:Show(SHOWNORMAL)
[toc] | [prev] | [next] | [standalone]
| From | Jamal <nospam@example.com> |
|---|---|
| Date | 2022-12-16 15:58 -0500 |
| Message-ID | <tnim59$1d4d$1@gioia.aioe.org> |
| In reply to | #13708 |
David,
The problem is that you are not using the Dimension class correctly.
This class has only 2 arguments, not 4. Your passing 0 for nWidth and
nHeight for the first two arguments, effectively making the ListBox
control invisible:
Here is the class definition
Dimension{[<nWidth>], [<nHeight>]}
So, change your code to:
local oDim := Dimension {200,200}
local oList := ListBox{self, 99, Point{10,10}, oDim}
oList:Show(SHOWNORMAL)
IMPORTANT: you are declaring a local oList variable. This should be a
PROTECT oList as ListBox at the window class level so can access it
later on.
Jamal
On 12/15/2022 1:01 PM, David Linda wrote:
> I placed the code below in the activate event of a datawindow and I could see no listbox. Then I put the code in the click event of a pushbutton and still no listbox.
>
> local oDim := Dimension {0,0,200,200}
> local oList := ListBox{self, 99, Point{10,10},oDim}
>
> oList:Show(SHOWNORMAL)
>
> Thanks,
>
> Dsvid
>
>
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.clipper.visual-objects
csiph-web