Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #13712

Re: Can anyone tell me why the code below doesn't work?

From Jamal <nospam@example.com>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: Can anyone tell me why the code below doesn't work?
Date 2022-12-16 15:58 -0500
Organization Aioe.org NNTP Server
Message-ID <tnim59$1d4d$1@gioia.aioe.org> (permalink)
References <1f2106f3-2ce2-458b-b22f-70e12b0f34afn@googlegroups.com>

Show all headers | View raw


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
> 
> 

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

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

csiph-web