Top.Mail.Ru
Мастера DELPHI, Delphi programming community Титульная страница Поиск, карта сайта Написать письмо 
| Новости | Поиск | FAQ | Статьи | Книги | Новости VCL |
| Форумы ЧАТ | Орешник | KOL и MCK |
Форумы -» Основная («Начинающим»)/ Базы / WinAPI / Компоненты / Сети / Media / Игры / Corba и COM / KOL / FreePascal / .Net / Прочее / RSDN.ORG

« предыдущая ветвь | форум | следующая ветвь »

KOL-CE Form.ControlByName


Страницы:   1 2

magi6162 ©   (2010-01-04 13:31:00) 

for i:=0 to count do
begin
 Self.ControlByName('v' + IntToStr(i)).Hint := 'AAAAA';
 i := i +1
end;

Does not recognize ControByName
Help me

thanks


magi6162   (2010-01-18 12:26:00) [1]

good!

thank you so much!

ciao.


Jon   (2010-01-15 18:23:00) [2]


> Use the 'Hint' to store strings. I must not see the hints.
>  I use them as tags.


You can use the CustomDataproperty:

Set: PControl(c).CustomData := PKOLChar('String to store as tag');
Get: MsgOK(PKOLChar(PControl(c).CustomData));

Nice and easy. No need for additional arrays ;-)


magi6162   (2010-01-14 18:15:00) [3]

I solved using arrays of strings.

thanks


magi6162   (2010-01-14 17:04:00) [4]

PControl(cl).Hint.Text :='AAA'

Compilazione ok, Esecuzione Ok.

but whatever value do to the string is not stored, without giving error.

Use the 'Hint' to store strings. I must not see the hints. I use them as tags.
any suggestions to workaround the problem?

thanks


magi6162   (2010-01-14 16:57:00) [5]

now works.
I indicated a different subject.

Excellent work.
thanks


Jon   (2010-01-14 14:06:00) [6]


> Where can I find the emulator?
> how I install it?
> as I run it?
> thanks


From Microsoft - details here: http://technet.microsoft.com/en-us/library/cc461417.aspx

You need:
- Virtual PC 2007 http://www.microsoft.com/downloads/details.aspx?FamilyID=04d26402-3199-48a3-afa2-2dc0b40a73b6&DisplayLang=en
- Device Emulator Standalone http://www.microsoft.com/downloads/details.aspx?familyid=A6F6ADAF-12E3-4B2F-A394-356E2C2FB114&displaylang=en
- Emulator images (Professional) http://www.microsoft.com/downloads/details.aspx?familyid=06111A3A-A651-4745-88EF-3D48091A390B&displaylang=en

Did the files from my project work correctly?


magi6162   (2010-01-14 13:24:00) [7]

You: I have downloaded and installed a Win-CE emulator to test.

Where can I find the emulator?
how I install it?
as I run it?
thanks


Jon   (2010-01-14 01:00:00) [8]

Sorry about the tooltips - I misread your post.

I have downloaded and installed a Win-CE emulator to test. I could not find ROM images for Windows Mobile 2003 SE so I tested with Windows Mobile 6 Professional (ARM920T).

The code works correctly and without errors for me.

Here is a link to my Lazarus project and compiled exe for you to test: http://www.sendspace.com/file/xxlrzj


magi6162   (2010-01-13 20:04:00) [9]

The device does not support tooltips.

But the error occurs:

PControl(c).Caption := 'AAA';  <-- Error here

without using the tooltips

The device shows only AccessViolation

thanks


Jon   (2010-01-13 18:14:00) [10]

Sorry, but I have no mobile device to test with.
Can you provide more details of the error?
Are you sure that the device can actually show tooltips?


magi6162   (2010-01-13 10:30:00) [11]

Some ideas to solve?

thanks


magi6162   (2010-01-12 10:32:00) [12]

I tried

compilation is ok

when I run on device(windows mobile 2003 SE) error Access Violation:

PControl(c).Caption := 'AAA';

Help me

grazie


Jon   (2010-01-11 18:03:00) [13]

Prego!


magi6162   (2010-01-11 16:59:00) [14]

great!

The compilation is OK!

Then try the application on the device

thank you very much!


magi6162   (2010-01-11 12:29:00) [15]

Will try today.

Thanks for your help and quick response.

thanks


Jon   (2010-01-08 21:34:00) [16]

Open KOLMHToolTip.pas
Find line 154:

const
 Dummy = 0;


Insert copied text from delphicommctrl.inc on next line:


{$ifdef wince}
 TTM_ADDTOOLW             = WM_USER + 50;
 TTM_DELTOOLW             = WM_USER + 51;
 TTM_NEWTOOLRECTW         = WM_USER + 52;
 TTM_GETTOOLINFOW         = WM_USER + 53;
 TTM_SETTOOLINFOW         = WM_USER + 54;
 TTM_HITTESTW             = WM_USER + 55;
 TTM_GETTEXTW             = WM_USER + 56;
 TTM_UPDATETIPTEXTW       = WM_USER + 57;
 TTM_ENUMTOOLSW           = WM_USER + 58;
 TTM_GETCURRENTTOOLW      = WM_USER + 59;
 TTM_WINDOWFROMPOINT      = WM_USER + 16;
 TTM_TRACKACTIVATE        = WM_USER + 17;  // wParam = TRUE/FALSE start end  lparam = LPTOOLINFO
 TTM_TRACKPOSITION        = WM_USER + 18;  // lParam = dwPos
 TTM_SETTIPBKCOLOR        = WM_USER + 19;
 TTM_SETTIPTEXTCOLOR      = WM_USER + 20;
 TTM_GETDELAYTIME         = WM_USER + 21;
 TTM_GETTIPBKCOLOR        = WM_USER + 22;
 TTM_GETTIPTEXTCOLOR      = WM_USER + 23;
 TTM_SETMAXTIPWIDTH       = WM_USER + 24;
 TTM_GETMAXTIPWIDTH       = WM_USER + 25;
 TTM_SETMARGIN            = WM_USER + 26;  // lParam = lprc
 TTM_GETMARGIN            = WM_USER + 27;  // lParam = lprc
 TTM_POP                  = WM_USER + 28;
 TTM_POPUP                = WM_USER + 34;
 TTM_UPDATE               = WM_USER + 29;
{$endif wince}


Hope it works!


magi6162   (2010-01-08 17:56:00) [17]

Sorry again.
this error is present:

MirrorKOLPackage when compiling with-dUSE_MHTOOLTIP, error:

C:\lazarus\components\kol-ce-2.80.3\kol\KOLMHToolTip.pas(268,50) Error: Identifier not found "TTM_GETDELAYTIME"
---------------------
You: Try to add the relevant bits from delphicommctrl.inc to your unit.

How can I do?

thanks


magi6162   (2010-01-08 17:24:00) [18]

sorry,
My last message was wrong, MirrorKOLPackage compiling with -dUSE_MHTOOLTIP OK.

v1..vxx: TKOLLabel

for i := 1 to nMesi do
begin
   c := Form.FindObj('v' + Int2Str(i));  
   if c <> nil then
      PControl(c).Hint.Text :='zzz'   <--- Error here
end;

still error:

fmain.pas(213,19) Error: identifier idents no member "Hint"

thanks


Jon   (2010-01-08 17:00:00) [19]

TTM_GETDELAYTIME is defined in delphicommctrl.inc

 TTM_GETDELAYTIME         = WM_USER + 21;

but in KOL.PAS it is only enabled for Win32...

{$IFDEF WIN}
//{_#IF [DELPHI]}
{$IFDEF WIN32}
 {$INCLUDE delphicommctrl.inc}
 {$IFDEF UNICODE_CTRLS}
   {$DEFINE interface_part} {$I KOL_unicode.inc} {$UNDEF interface_part}
 {$ELSE} // ANSI_CTRLS
{$ifndef FPC}
   {$DEFINE interface_part} {$I KOL_ansi.inc} {$UNDEF interface_part}
{$endif FPC}
 {$ENDIF UNICODE_CTRLS}
{$ENDIF WIN32}
//{_#ENDIF}
{$ENDIF WIN}


Try to add the relevant bits from delphicommctrl.inc to your unit.

Hopefully Yury Sidorov (the maintainer of KOL-CE) will read this and fix it in the SVN.


magi6162   (2010-01-08 16:37:00) [20]

MirrorKOLPackage when compiling with-dUSE_MHTOOLTIP, error:

C:\lazarus\components\kol-ce-2.80.3\kol\KOLMHToolTip.pas(268,50) Error: Identifier not found "TTM_GETDELAYTIME"

thanks


Страницы:   1 2

Наверх

Титульная страница Поиск, карта сайта Написать письмо