Home » Community » Newbie corner » Question on a widget on top of a widget **BUG STATEMENTS NOT COMPLETED BEFORE NEXT STATEMENT
Re: Question on a widget on top of a widget [message #33289 is a reply to message #33288] |
Fri, 22 July 2011 17:48   |
|
silverx wrote on Fri, 22 July 2011 17:02 | What is the difference between .Hide and .Show(false)
| There is no difference, Hide() exists just for convenience.
silverx wrote on Fri, 22 July 2011 17:02 | That is what I was using. The other thing is all items where added from layout and not from any code. Why should that make any difference?
I would prefer to build it in Layout instead of in code, if possible.
| Everything in layout is automatically Add()ed to the TopWindow. Well, IIRC, calling Add() on already added Ctrl is legal (it calls remove first), so theoretically you can put it in layout, but you still need to call the Add() in the code and probably also reposition it.
silverx wrote on Fri, 22 July 2011 17:02 | But if I do set it in code I need to set the size and position with .SetRect, is the x and y based upon the item it is added to?
| Yes, everything is then positioned relatively to the top-left corner of the parent Ctrl.
silverx wrote on Fri, 22 July 2011 17:02 | Also I tried your code, but changing from App to T5, Code is:
...
And I get the following error:
t5: 1 file(s) built in (0:02.35), 2356 msecs / file, duration = 2356 msecs, parallelization 0%
Linking...
LIBCMTD.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
C:\upp\out\MSC9.Debug.Debug_full\t5.exe : fatal error LNK1120: 1 unresolved externals
There were errors. (0:02.88)
|
You forget to add a GUI flag 
silverx wrote on Fri, 22 July 2011 17:02 | In addition I tried to do the add of the object in my code to my program, and just set position and FrameSet so I could see it. When I execute the code it does show up, but then when I start using it, it never comes back. The only way it shows up is if I do a PromptOK after I do the .Show.
I did the add in code using the following. It is for my own widget, that I have defined, after button.
W1.Add(E1.HCenterPos(10).VCenterPos(10));
W2.Add(E2.HCenterPos(10).VCenterPos(10));
E1.SetFrame(BlackFrame());
E2.SetFrame(BlackFrame());
I am using a image in the both cases, I just want the second image to show up for about 1 second then hide it again on top of the other image.
I think it is a bug on Windows Vista.
|
I don't see anything wrong with the posted line, the problem is probably somewhere else. Can't say where without seeing more of the code. Anyway, I am pretty sure that it is not related to Windows 
Honza
|
|
|
Goto Forum:
Current Time: Sun Sep 07 13:47:31 CEST 2025
Total time taken to generate the page: 0.08859 seconds
|