Trick: Change Toolbar Status (SymbianUIQ)

xiaoxiao2021-03-06  38

While you develop program such as streaming media player, you want the toolbar which contains PLAY (RESUME) / PAUSE / STOP to switch status among playback / pause / stop.For example, when stream ends, you need to enable PLAY button and disable PAUSE / STOP buttons.The following code segment demonstates this kind of use: void CStreamClientAppUi :: SetToolbarStatusAndDraw () {TBool dimPlay = EFalse; TBool dimPause = ETrue; TBool dimStop = ETrue;

iEikonEnv-> AppUiFactory () -> ToolBar () -> DimCommand (EMPCmdPlayStream, dimPlay); iEikonEnv-> AppUiFactory () -> ToolBar () -> DimCommand (EMPCmdPauseStream, dimPause); iEikonEnv-> AppUiFactory () -> ToolBar ( ) -> Dimcommand (EMPCMDSTREAM, DIMSTOP); ieikonenv-> appuifactory () -> Toolbar () -> DrawNow (); // you need this line}

转载请注明原文地址:https://www.9cbs.com/read-69486.html

New Post(0)